GHSA-x52f-h5g4-8qv5

Suggest an improvement
Source
https://github.com/advisories/GHSA-x52f-h5g4-8qv5
Import Source
https://github.com/github/advisory-database/blob/main/advisories/github-reviewed/2024/12/GHSA-x52f-h5g4-8qv5/GHSA-x52f-h5g4-8qv5.json
JSON Data
https://api.test.osv.dev/v1/vulns/GHSA-x52f-h5g4-8qv5
Aliases
Published
2024-12-26T18:25:25Z
Modified
2024-12-26T21:45:58Z
Severity
  • 5.3 (Medium) CVSS_V3 - CVSS:3.1/AV:L/AC:L/PR:N/UI:R/S:U/C:L/I:L/A:L CVSS Calculator
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.

Database specific
{
    "nvd_published_at": "2024-12-26T21:15:06Z",
    "cwe_ids": [
        "CWE-79"
    ],
    "severity": "MODERATE",
    "github_reviewed": true,
    "github_reviewed_at": "2024-12-26T18:25:25Z"
}
References

Affected packages

npm / @marp-team/marp-core

Package

Name
@marp-team/marp-core
View open source insights on deps.dev
Purl
pkg:npm/%40marp-team/marp-core

Affected ranges

Type
SEMVER
Events
Introduced
3.0.2
Fixed
3.9.1

Database specific

{
    "last_known_affected_version_range": "<= 3.9.0"
}

npm / @marp-team/marp-core

Package

Name
@marp-team/marp-core
View open source insights on deps.dev
Purl
pkg:npm/%40marp-team/marp-core

Affected ranges

Type
SEMVER
Events
Introduced
4.0.0
Fixed
4.0.1

Affected versions

4.*

4.0.0