dompurify is vulnerable to Cross-Site Scripting (XSS)
37
CVE Score
Low
Cross-Site Scripting (XSS)
DOMPurify's SMIL attributeName="href" guard compares the attribute name after transformCaseFunc, which lowercases names in HTML mode but is the identity function in XHTML mode because XML names are case sensitive. In an application/xhtml+xml document the attribute keeps its camelCase spelling attributeName, so the comparison against the lowercase literal never matches and the guard never strips it. An allowed <animate> or <set> element can then carry attributeName="href" with a javascript: payload hidden in a semicolon separated values list, which SMIL applies as the parent link's effective href. The fix lowercases the attribute name consistently so XHTML mode is checked the same way as HTML mode.
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 set PARSER_MEDIA_TYPE to application/xhtml+xml while allowing the attributeName attribute on SVG animate or set elements.
0.0.1 - 3.4.16
Fixed in 3.4.17dompurify is vulnerable to Cross-Site Scripting (XSS) in versions 0.0.1 - 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.