dompurify is vulnerable to Cross-Site Scripting (XSS)
47
Medium Risk
When DOMPurify.sanitize receives a DocumentFragment whose child is a shadow host, it moves the fragment's children into an internal working body and leaves the fragment empty before sanitizing. The attached shadow root traversal then runs from the now empty fragment instead of the working body, so the child host's open shadow root is never scanned. Content inside that shadow root, including a javascript: URL or event handler, is returned unsanitized when a DOM fragment is requested. The fix runs the attached shadow root traversal from the working body so hosts moved out of the fragment are still sanitized.
You are affected if you are using a version that falls within the vulnerable range and you pass a DOM fragment that carries an attached shadow root to DOMPurify.sanitize.
dompurify is vulnerable to Cross-Site Scripting (XSS) in versions 3.4.3 - 3.4.14.
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
ISO 42001Compliant© All Intel data is openly available and commercially licensed.