Cross-Site Scripting Vulnerability in DOMPurify Product by Cure53
CVE-2026-0540
5.3MEDIUM
What is CVE-2026-0540?
DOMPurify, a popular HTML sanitization library, is affected by a cross-site scripting vulnerability due to insufficient attribute sanitization in certain versions. Specifically, the vulnerability arises from the absence of protection for five rawtext elements, namely noscript, xmp, noembed, noframes, and iframe, within the SAFE_FOR_XML regex. Attackers can exploit this issue by injecting malicious payloads into attribute values, which may allow them to execute arbitrary JavaScript when the sanitized output is rendered in contexts that do not enforce the necessary restrictions.
Affected Version(s)
DOMPurify 3.1.3 <= 3.3.1
DOMPurify 2.5.3 <= 2.5.8
