dompurify is vulnerable to Cross-Site Scripting (XSS)
31
Low Risk
DOMPurify's IN_PLACE mode sanitizes the caller's live DOM subtree. When a hook removes a node during sanitization, the removed subtree must still have its attributes stripped before sanitize() returns, but that step only ran for the beforeSanitizeElements and uponSanitizeElement hooks. A hook registered at afterSanitizeElements, beforeSanitizeAttributes, or afterSanitizeAttributes that removes a non-root element leaves its detached subtree with attributes that are not on the allow list, so descendant on* handlers stay in the caller's live tree after sanitize() returns, leading to DOM based cross-site scripting. The patch runs the same check at every per node hook site that can detach a node.
You are affected if you are using a version that falls within the vulnerable range and you call sanitize() with IN_PLACE: true together with a hook that removes a node other than the sanitization root.
dompurify is vulnerable to Cross-Site Scripting (XSS) in versions 3.4.13 - 3.4.15.
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.