dompurify is vulnerable to Cross-Site Scripting (XSS)
31
CVE Score
Low
Cross-Site Scripting (XSS)
DOMPurify can sanitize existing DOM nodes in place when the IN_PLACE option is enabled. When a sanitization hook removes a containing element, the sanitizer returns early without neutralizing that element's now-detached descendants, so a descendant such as an image keeps an already-armed event handler. The returned root looks clean, but the retained handler still runs after sanitize() returns once the pending resource event fires. The fix neutralizes the detached subtree before returning from the hook-removal path so queued handlers are stripped.
Upgrade the dompurify library to the patch version.
You are affected if you are using a version that falls within the vulnerable range and you use IN_PLACE sanitization together with a hook that removes a containing element, so that untrusted HTML with a resource element (for example an img with an onload/onerror handler) can retain an executable handler on the detached subtree.
0.0.1 - 3.4.12
Fixed in 3.4.13dompurify is vulnerable to Cross-Site Scripting (XSS) in versions 0.0.1 - 3.4.12.
Secure your code, cloud, and runtime in one central system. Connect a repo to discover what the reasoning agents find in your codebase.
No credit card required | Scan results in 32 seconds.
I consent to receiving marketing communications based on Aikido’s Privacy Policy.
SOC 2Compliant
ISO 27001Compliant
ISO 42001Compliant© All Intel data is openly available and commercially licensed.