DOMPurify before 3.4.17 DOM XSS via IN_PLACE Hook-Detached Subtrees
- Published
- Last modified
- Where the record stands: published, rejected by its publisher, or superseded by another id.What do these mean? →
- published
- Whether CISA lists it in its Known Exploited Vulnerabilities catalog: proof that attackers are using it.What do these mean? →
- Not listed in CISA KEV
- Fix
- Fixed in 3.4.17
- Whether working attack code is public (Exploit-DB, Metasploit, Nuclei or GitHub). Public code makes attacks easier.What do these mean? →
- None on Exploit-DB, Metasploit or GitHub
Summary
DOMPurify, a widely used JavaScript library for sanitizing HTML, is affected when its IN_PLACE hook removes a parent or sibling node, which can leave attacker-supplied elements unsanitized. This allows malicious event handlers, such as an image onerror attribute, to run after sanitization and enables DOM-based cross-site scripting in web applications that use the library.
Summarized by anthropic/claude-haiku-5.5. Verify details against the original sources.
Read the original description
DOMPurify before 3.4.17 contains a cross-site scripting vulnerability that allows attackers to keep event handlers armed when an IN_PLACE hook removes a parent or sibling node. Attacker markup in detached subtrees is never walked or neutralized, so handlers like img onerror fire after sanitize() returns, causing DOM XSS.
Timeline
- CVE published
- First seen by cve.now
Affected versions
- cure53 DOMPurify
fixed in 3.4.17
- dompurifynpm
fixed in 3.4.17