Back to list

DOMPurify: IN_PLACE: node-removing afterSanitize hook leaves detached subtree event handlers armed, causing DOM XSS — GHSA-P98J-92PF-MC4P

GitHub · GitHub · GHSA-P98J-92PF-MC4P

ID
GHSA-P98J-92PF-MC4P
Date
Source
GitHub
Vendor
GitHub
Threat
low
CVSS
2.3

Summary

## Summary In `IN_PLACE` mode DOMPurify sanitizes the caller's live DOM subtree directly. To close a known hazard (GHSA-55q2-fjhq-7xh7), the library neutralizes any node a hook detaches during sanitization by stripping its subtree's non-allow-listed attributes, but this neutralization is wired only into the `beforeSanitizeElements` and `uponSanitizeElement` hook sites. An `afterSanitizeElements` or…

Timeline

Published by source
2026-09-30

Risk context

  • Reported severity or threat level: low.
  • Reported CVSS score: 2.3 out of 10.
  • Review exposure for the affected product or family: npm: dompurify.

Product

npm: dompurify

What to do

General, cautious steps (verify details in the official source):

  • Review exposure and plan remediation based on risk and environment.
  • Identify affected product versions in your inventory and verify whether you are impacted.
  • Apply vendor patches/updates or recommended mitigations as soon as available.
  • Read the official advisory for exact affected versions and remediation steps.

Official advisory

Evidence and provenance

Canonical advisory ID
GHSA-P98J-92PF-MC4P
Source
GitHub
Vendor
GitHub
Published by source
2026-09-30
Last source activity
2026-09-30
Curated by
hlukh.ch

Related advisories and connections

These advisories are connected by shared CVE, product, vendor, source, or time signals.