Skip to content

fix: harden sanitize-html xmp handling (GHSA-rpr9-rxv7-x643)#24

Merged
SINENSIA merged 3 commits into
mainfrom
fix/ghsa-rpr9-rxv7-x643
May 14, 2026
Merged

fix: harden sanitize-html xmp handling (GHSA-rpr9-rxv7-x643)#24
SINENSIA merged 3 commits into
mainfrom
fix/ghsa-rpr9-rxv7-x643

Conversation

@SINENSIA
Copy link
Copy Markdown
Owner

Summary

  • Forces disallowed xmp content into nonTextTags unless xmp is explicitly allowed, closing the GHSA-rpr9-rxv7-x643 bypass path.
  • Applies to both the built-in default policy and any custom policy loaded through ALLOWLIST_FILE (lib/allowlist.js).
  • Adds regression coverage for the advisory's xmp PoC in tests/allowlist.test.js and tests/validation.test.js.

Test plan

  • npm test passes locally and in CI

…-x643 by forcing disallowed xmp content into nonTextTags unless xmp is explicitly allowed. That change is in lib/allowlist.js. It covers both the built-in default policy and any custom policy loaded through ALLOWLIST_FILE. Also added regressions in tests/allowlist.test.js and tests/validation.test.js for the advisory’s xmp PoC path.
@SINENSIA SINENSIA self-assigned this May 14, 2026
@SINENSIA SINENSIA requested a review from scops May 14, 2026 21:11
@SINENSIA SINENSIA requested a review from scops May 14, 2026 21:15
@scops
Copy link
Copy Markdown
Collaborator

scops commented May 14, 2026

There is already patched version 2.17.4, we need to update lockfile

@SINENSIA SINENSIA added the depedencies Dependency updates label May 14, 2026
@SINENSIA SINENSIA assigned scops and unassigned SINENSIA May 14, 2026
@SINENSIA SINENSIA merged commit 914f8d9 into main May 14, 2026
6 checks passed
@SINENSIA SINENSIA deleted the fix/ghsa-rpr9-rxv7-x643 branch May 14, 2026 21:21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

depedencies Dependency updates

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants