Marp Core allows XSS by improper neutralization of HTML sanitization
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
- CWE-79: Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting')
- https://github.com/marp-team/marp-core/pull/282
- https://github.com/marp-team/marp-core/commit/61a1def244d1b6faa8e2c0be97ec0b68cab3ab49
Credits
Thanks to @Ry0taK for finding out this vulnerability.
Betroffene Software
Klicken Sie auf eine Technologie, um alle zugehörigen Schwachstellen anzuzeigen.
| Plattform | Paket | Anfällige Versionen | Behoben in |
|---|---|---|---|
| npm-Paket | @marp-team/marp-core | >= 3.0.2, < 3.9.1, >= 4.0.0, < 4.0.1 | 3.9.1, 4.0.1 |
Verweise
- https://github.com/marp-team/marp-core/security/advisories/GHSA-x52f-h5g4-8qv5
- https://nvd.nist.gov/vuln/detail/CVE-2024-56510
- https://github.com/marp-team/marp-core/pull/282
- https://github.com/marp-team/marp-core/commit/61a1def244d1b6faa8e2c0be97ec0b68cab3ab49
- https://github.com/marp-team/marp-core
- https://github.com/marp-team/marp-core/releases/tag/v3.9.1
- https://github.com/marp-team/marp-core/releases/tag/v4.0.1
- CVSS-Vektor
CVSS:3.1/AV:L/AC:L/PR:N/UI:R/S:U/C:L/I:L/A:L- Schwäche (CWE)
CWE-79- Plattform
- npm
- Paket
@marp-team/marp-core- Veröffentlicht
- 26.12.2024
- Aktualisiert
- 11.10.2026 10:22
Quellen und Lizenzen
OSV / GitHub Advisory Database - GHSA-x52f-h5g4-8qv5 - CC BY 4.0
Schwachstellenhistorie: @marp-team/marp-core
Alle veröffentlichten Schwachstellen dieses Pakets (npm-Paket), neueste zuerst. Zeigt, ob es ein einmaliger Ausrutscher ist oder ein Paket, das man im Auge behalten muss.
Dies ist die einzige bekannte Schwachstelle dieses Pakets.
Erkennen Sie Schwachstellen in Ihrer Anwendung
Mit der DockRay-Integration und aktivierter Softwareinventarisierung prüft DockRay gemeldete Komponentenversionen auf bekannte Schwachstellen und benachrichtigt Sie über bestätigte Treffer. Die Abdeckung hängt von der unterstützten Technologie und den verfügbaren Meldungen ab.