Advisory

GHSA-x52f-h5g4-8qv5

Also known as: CVE-2024-56510

Summary

Marp Core allows XSS by improper neutralization of HTML sanitization

Details

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.

Severity

Medium Basis: The source's own band: MODERATE

Dates

Published
2024-12-26 18:25 UTC
Modified
2024-12-26 21:45 UTC

Affected packages and fixes

@marp-team/marp-core

npm · All systems

Affected

  • introduced 3.0.2, fixed 3.9.1 (semver)

Fixed versions

3.9.1

Fix

@marp-team/marp-core

npm · All systems

Affected

  • introduced 4.0.0, fixed 4.0.1 (semver)

Fixed versions

4.0.1

Fix

Fix commands are the export's own generic commands. Ojuju never runs them. Check them against your setup first.

Check your own computer: guard packages check

View this record on OSV.dev

Source

Source: GitHub Advisory Database (reviewed advisories) · CC BY 4.0

Sources & licences