Cross-site scripting in DOMPurify - #VU140846
Published: August 4, 2026
Vulnerability details
The vulnerability allows a remote user to execute arbitrary JavaScript in the application's origin.
The vulnerability exists due to cross-site scripting in _sanitizeElements() when sanitizing attacker-supplied HTML with IN_PLACE enabled and an element-removal hook detaches the current node. A remote user can supply crafted HTML containing a descendant resource element with an event handler to execute arbitrary JavaScript in the application's origin.
User interaction is required to render the sanitized content, and exploitation requires the non-default IN_PLACE configuration together with a hook that removes a containing element.