npm
CVE-2026-116803
DOMPurify IN_PLACE: hook that removes a parent or sibling leaves the detached subtree's event handlers armed (incomplete fix for GHSA-p98j-92pf-mc4p)
- Severity
- High
- Published
- 22 Oct 2026
- Last changed
- 27 Oct 2026
- Added to UpHeron
- 23 Oct 2026
- Fixed in
- 3.4.17
- Exploit chance
- 0.2% in the next 30 daysHigher than 5% of CVEs. EPSS by FIRST, 19 Nov 2026
- Also known as
- GHSA-mrv2-3pqr-j5jr
- Sources
- OSV.dev and GitHub
Description
The 3.4.16 fix for GHSA-p98j-92pf-mc4p only covers a hook that removes the node it was called for. If an IN_PLACE hook removes a different node, like the current node's parent or a sibling that has not been visited yet, that subtree is never walked or neutralized. Event handlers in it stay on the elements, and an that was already loading fires after sanitize()` returns.
The README says: "Nodes that a hook detaches from the tree ... are treated as removed. In IN_PLACE mode their subtree is neutralized inline, so an that was already loading when you built the live tree cannot fire after sanitize()` returns." That does not hold when the detached node is not the hook's own node.
src/purify.ts line 2134 (dist/purify.cjs.js line 2009 in 3.4.16), _handleHookDetachedNode():
It only checks whether currentNode lost its parent. When a hook removes currentNode.parentNode (or any ancestor), currentNode still has a parent, so nothing happens.
Affected software
| Software | Affected versions |
|---|---|
dompurifynpm · osv:npm:dompurify |
|
About dompurify
- Weekly downloads (npm)
- 100,045,636npm, 15 Nov 2026
Vulnerabilities in dompurify
- In our list
- 3
- Published in the last 12 months
- 3
- Critical, last 12 months
- 1
- High, last 12 months
- 1
- Known exploited
- 0
- CVE-2026-116804DOMPurify SAFE_FOR_TEMPLATES bypass: split template expressions survive in attached shadow root content on DOM output modesCritical 22 Oct 2026
- CVE-2026-116802DOMPurify: SMIL attributeName=href guard is skipped when PARSER_MEDIA_TYPE is application/xhtml+xmlLow 22 Oct 2026
References
- CVE.org https://www.cve.org/CVERecord?id=CVE-2026-116803
- GitHub Advisory Database https://github.com/advisories/GHSA-mrv2-3pqr-j5jr