NewApp Monitoring is liveSign up free
AgentbeamBeta
Open-source package vulnerability · npm

CVE-2024-56510: Marp Core allows XSS by improper neutralization of HTML sanitization

mediumCVSS 3.1 5.3GHSA-x52f-h5g4-8qv5

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.

Published Dec 26, 2024

Affected packages

@marp-team/marp-core

Ecosystem
npm
Affected
>= 3.0.2, <= 3.9.0
Fixed in
3.9.1
Check
npm ls @marp-team/marp-core

@marp-team/marp-core

Ecosystem
npm
Affected
= 4.0.0
Fixed in
4.0.1
Check
npm ls @marp-team/marp-core

Advisory details

From the GitHub Advisory Database (CC BY 4.0).

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.

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

References

Credits

Thanks to @Ry0taK for finding out this vulnerability.

Credited to Ry0taK.

References

How this page is made: the data panel comes from the GitHub Advisory Database, CISA’s KEV catalog, the NVD and FIRST EPSS, and updates twice a day. No analysis has been written for this entry yet. Methodology