CVE-2024-56510: @marp team/marp core Cross-Site Scripting Vulnerability
MODERATECVE-2024-56510 is a MODERATE (CVSS 5.3) cross-site scripting vulnerability (CWE-79: Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting')) affecting @marp team/marp core libraries in the npm ecosystem. The issue involves marp core allows xss by improper neutralization of html sanitization. Remediation is available by upgrading affected packages to version 3.9.1, 4.0.1.
CVE-2024-56510 at a Glance
Security Impact
CVSS: 5.3
The security impact metrics below are parsed directly from the CVSS v3.1 vector string (CVSS:3.1/AV:L/AC:L/PR:N/UI:R/S:U/C:L/I:L/A:L).
How to Fix CVE-2024-56510
To remediate this vulnerability, upgrade all affected @marp team/marp core dependencies to a patched release. Both direct and transitive dependencies should be checked, as frameworks or security libraries may pull in vulnerable versions transitively.
npm install @marp-team/marp-core@3.9.1
npm install @marp-team/marp-core@4.0.1
Run the following command in your project directory to verify that all resolved dependencies use the patched release:
npm ls @marp-team/marp-core
How to Check if You Are Affected
To determine whether your Node.js application is affected by CVE-2024-56510, inspect your project dependencies using npm:
npm ls @marp-team/marp-core
Analyze the terminal output to locate any version of @marp team/marp core in your dependency tree. If any resolved version matches the vulnerable ranges listed in the table below (for example, versions earlier than 3.9.1), your application is affected.
Note: The npm ls @marp-team/marp-core command inspects dependencies declared in your package.json and lockfile; it does not perform automated runtime dynamic scanning.
Technical Details
Vulnerability Mechanism & Technical Analysis
This vulnerability is classified under CWE-79: Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting'), where the product does not neutralize or incorrectly neutralizes user-controllable input before it is placed in output that is used as a web page that is served to other users. In @marp team/marp core, software state validation or input boundaries are circumvented during processing. Review the official source advisory statement below for specific affected components, classes, and reproduction details.
Source Advisory Statement
CVE-2024-56510 Affected @marp team/marp core Versions
2 component(s)| Product / Package | Ecosystem | Affected Versions | Fixed Version |
|---|---|---|---|
|
@marp-team/marp-core
|
npm |
≥ 3.0.2
< 3.9.1
|
3.9.1
|
|
@marp-team/marp-core
|
npm |
≥ 4.0.0
< 4.0.1
All 1 versions
4.0.0
|
4.0.1
|
References
Frequently Asked Questions
What is CVE-2024-56510?
Which @marp team/marp core versions are affected?
What version fixes CVE-2024-56510?
Is @marp-team/marp-core affected?
What is the CVSS score of CVE-2024-56510?
What CWE is associated with CVE-2024-56510?
How can I check npm dependencies for CVE-2024-56510?
Machine-readable OSV JSON
OSV v1.5 Schema
{
"schema_version" : "1.4.0",
"id" : "GHSA-x52f-h5g4-8qv5",
"modified" : "2024-12-26T21:45:58Z",
"published" : "2024-12-26T18:25:25Z",
"aliases" : [ "CVE-2024-56510" ],
"summary" : "Marp Core allows XSS by improper neutralization of HTML sanitization",
"details" : "Marp Core ([`@marp-team/marp-core`](https://www.npmjs.com/package/@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.\n\n### Impact\n\nMarp 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).\n\n### Patches\n\nMarp Core [v3.9.1](https://github.com/marp-team/marp-core/releases/tag/v3.9.1) and [v4.0.1](https://github.com/marp-team/marp-core/releases/tag/v4.0.1) have been patched to fix that.\n\n### Workarounds\n\nIf you are unable to update the package immediately, disable all HTML tags by setting `html: false` option in the `Marp` class constructor.\n\n```javascript\nconst marp = new Marp({ html: false })\n```\n\n### References\n\n- [CWE-79: Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting')](https://cwe.mitre.org/data/definitions/79.html)\n- https://github.com/marp-team/marp-core/pull/282\n- https://github.com/marp-team/marp-core/commit/61a1def244d1b6faa8e2c0be97ec0b68cab3ab49\n\n### Credits\n\nThanks to @Ry0taK for finding out this vulnerability.",
"severity" : [ {
"type" : "CVSS_V3",
"score" : "CVSS:3.1/AV:L/AC:L/PR:N/UI:R/S:U/C:L/I:L/A:L"
} ],
"affected" : [ {
"package" : {
"ecosystem" : "npm",
"name" : "@marp-team/marp-core"
},
"ranges" : [ {
"type" : "ECOSYSTEM",
"events" : [ {
"introduced" : "3.0.2"
}, {
"fixed" : "3.9.1"
} ]
} ],
"database_specific" : {
"last_known_affected_version_range" : "<= 3.9.0"
}
}, {
"package" : {
"ecosystem" : "npm",
"name" : "@marp-team/marp-core"
},
"ranges" : [ {
"type" : "ECOSYSTEM",
"events" : [ {
"introduced" : "4.0.0"
}, {
"fixed" : "4.0.1"
} ]
} ],
"versions" : [ "4.0.0" ]
} ],
"references" : [ {
"type" : "WEB",
"url" : "https://github.com/marp-team/marp-core/security/advisories/GHSA-x52f-h5g4-8qv5"
}, {
"type" : "ADVISORY",
"url" : "https://nvd.nist.gov/vuln/detail/CVE-2024-56510"
}, {
"type" : "WEB",
"url" : "https://github.com/marp-team/marp-core/pull/282"
}, {
"type" : "WEB",
"url" : "https://github.com/marp-team/marp-core/commit/61a1def244d1b6faa8e2c0be97ec0b68cab3ab49"
}, {
"type" : "PACKAGE",
"url" : "https://github.com/marp-team/marp-core"
}, {
"type" : "WEB",
"url" : "https://github.com/marp-team/marp-core/releases/tag/v3.9.1"
}, {
"type" : "WEB",
"url" : "https://github.com/marp-team/marp-core/releases/tag/v4.0.1"
} ],
"database_specific" : {
"cwe_ids" : [ "CWE-79" ],
"severity" : "MODERATE",
"github_reviewed" : true,
"github_reviewed_at" : "2024-12-26T18:25:25Z",
"nvd_published_at" : "2024-12-26T21:15:06Z"
}
}