Cross-site scripting in DOMPurify - #VU140846

 

Cross-site scripting in DOMPurify - #VU140846

Published: August 4, 2026


Vulnerability identifier: #VU140846
CSH Severity: Low
CVSS v4: 2.1 [CVSS:4.0/AV:N/AC:L/AT:P/PR:L/UI:P/VC:N/VI:N/VA:N/SC:L/SI:L/SA:N]
CVE-ID: N/A
CWE-ID: CWE-79
Exploitation vector: Remote access
Exploit availability: No public exploit available

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.


Affected software

DOMPurify

Remediation

Install security update from vendor's website.

DOMPurify - update to 3.4.13

External References

Related Security Bulletins