dompurify is vulnerable to Cross-Site Scripting (XSS)
38
Low Risk
DOMPurify sanitizes HTML to prevent cross-site scripting, but its handling of literal-text (rawtext) elements and attribute removal can be bypassed to produce mutation XSS. When an application allow-lists risky literal-text tags such as style, xmp, noembed, noframes, or noscript, their raw text content is serialized literally and re-opens markup when the output is reparsed as HTML, smuggling executable elements past sanitization. Dangerous attributes carrying uppercase names, such as event handlers or javascript: URLs, also survive name-based attribute removal in mixed XML and HTML document contexts and become active after serialization. The fix extends reparse protection to all literal-text elements and removes attributes by their exact node so case-preserved names are stripped.
You are affected if you are using a version that falls within the vulnerable range and your application allow-lists risky literal-text tags such as style, xmp, noembed, or noscript, or sanitizes markup parsed in mixed XML and HTML document contexts.
dompurify is vulnerable to Cross-Site Scripting (XSS) in versions 2.0.0 - 3.4.13.
Upgrade the dompurify library to the patch version.
Connect your repositories to instantly see whether vulnerable or malicious packages exist in your codebase.
Free. No credit card required.

I consent to receiving marketing communications based on Aikido’s Privacy Policy.
SOC 2Compliant
ISO 27001Compliant