dompurify is vulnerable to Cross-Site Scripting (XSS)
31
CVE Score
Low
Cross-Site Scripting (XSS)
After the walk, DOMPurify's _scrubTemplateExpressions step merges adjacent text nodes and strips template expressions that only form after that merge, but the step does not run inside attached shadow roots. With SAFE_FOR_TEMPLATES combined with RETURN_DOM, RETURN_DOM_FRAGMENT, or IN_PLACE, a template expression split across text nodes by a disallowed element inside a shadow root is joined again once that element is removed, and that expression remains in the shadow root's serialized text content, so a downstream template engine that reads that content can run the untrusted input. The fix runs that scrub on shadow root content, including nested shadow roots and templates inside them.
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 combine SAFE_FOR_TEMPLATES: true with RETURN_DOM, RETURN_DOM_FRAGMENT, or IN_PLACE on a node that carries an attached shadow root.
3.4.4 - 3.4.16
Fixed in 3.4.17dompurify is vulnerable to Cross-Site Scripting (XSS) in versions 3.4.4 - 3.4.16.
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.