Medium

Marp Core allows XSS by improper neutralization of HTML sanitization

  • Disclosed: 26.12.2024
  • Updated: 11.10.2026 10:22

Marp Core (@marp-team/marp-core) from v3.0.2 to v3.9.0 and v4.0.0, are vulnerable to cross-site scripting (XSS) due to improper neutralization of HTML sanitization.

Impact

Marp Core includes an HTML sanitizer with allowlist support. In the affected versions, the built-in allowlist is enabled by default. When the allowlist is active, if insufficient HTML comments are included, the sanitizer may fail to properly sanitize HTML content and lead cross-site scripting (XSS).

Patches

Marp Core v3.9.1 and v4.0.1 have been patched to fix that.

Workarounds

If you are unable to update the package immediately, disable all HTML tags by setting html: false option in the Marp class constructor.

js
const marp = new Marp({ html: false })

References

Credits

Thanks to @Ry0taK for finding out this vulnerability.

Affected software

Click a technology to see all vulnerabilities affecting it.

PlatformPackageVulnerable versionsFixed in
npm package @marp-team/marp-core >= 3.0.2, < 3.9.1, >= 4.0.0, < 4.0.1 3.9.1, 4.0.1

References

CVSS score 5.3/10
CVSS vector
CVSS:3.1/AV:L/AC:L/PR:N/UI:R/S:U/C:L/I:L/A:L
Weakness (CWE)
CWE-79
Platform
npm
Package
@marp-team/marp-core
Disclosed
26.12.2024
Updated
11.10.2026 10:22

Sources and licenses

OSV / GitHub Advisory Database - GHSA-x52f-h5g4-8qv5 - CC BY 4.0

Vulnerability history: @marp-team/marp-core

All published vulnerabilities of this package (npm package), newest first. Shows whether this is a one-off slip or a package that needs watching.

This is the only known vulnerability of this package.

Know which vulnerabilities affect your application

With the DockRay integration and software inventory enabled, DockRay checks reported component versions against known vulnerabilities and notifies you about confirmed matches. Coverage depends on the supported technology and available advisory data.

Connect your application
DockRay newsletter

Application security in your inbox

Important vulnerabilities, actionable guidance and practical advice for your applications. Choose your technologies and follow what matters to your project.

  • A daily digest of new vulnerabilities, critical ones included.
  • Notifications about important updates.
  • Practical advice on application security and monitoring.

Leave empty to receive updates for every technology.

Free to subscribe. Unsubscribe with one click in any email.