dompurify is vulnerable to Cross-Site Scripting (XSS)
26
CVE Score
Low
Cross-Site Scripting (XSS)
When DOMPurify.sanitize runs with SAFE_FOR_TEMPLATES together with RETURN_DOM, RETURN_DOM_FRAGMENT, or IN_PLACE, attacker HTML inside a template element can keep split template-literal, mustache, or ERB fragments in template.content. The final _scrubTemplateExpressions pass never entered template.content, so adjacent text nodes that only form expressions after normalization could survive. Downstream template evaluation or normalization can then execute the recovered expression as script. The fix recurses _scrubTemplateExpressions into each template.content, mirroring shadow-DOM traversal.
Upgrade the dompurify library to the patch version.
You are affected if you are using a version that falls within the vulnerable range and sanitize attacker-controlled HTML with SAFE_FOR_TEMPLATES enabled together with RETURN_DOM, RETURN_DOM_FRAGMENT, or IN_PLACE.
3.0.0 - 3.4.7
Fixed in 3.4.8dompurify is vulnerable to Cross-Site Scripting (XSS) in versions 3.0.0 - 3.4.7.
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.