CVE-2026-0540 Details
Description
DOMPurify 3.1.3 through 3.3.1 and 2.5.3 through 2.5.8, fixed in commit 2726c74, contain a cross-site scripting vulnerability that allows attackers to bypass attribute sanitization by exploiting five missing rawtext elements (noscript, xmp, noembed, noframes, iframe) in the SAFE_FOR_XML regex. Attackers can include payloads like </noscript><img src=x onerror=alert(1)> in attribute values to execute JavaScript when sanitized output is placed inside these unprotected rawtext contexts.
A cross-site scripting vulnerability has been identified in DOMPurify versions 3.1.3 through 3.3.1 and 2.5.3 through 2.5.8. This vulnerability allows attackers to bypass attribute sanitization by exploiting five missing rawtext elements in the SAFE_FOR_XML regex. The unprotected elements are noscript, xmp, noembed, noframes, and iframe. Attackers can inject payloads, such as closing tags followed by an image tag with an event handler, into attribute values. When the sanitized output is placed inside these rawtext contexts, the injected JavaScript is executed.
Users can update to DOMPurify version 3.3.1 or the latest 2.x version to address this vulnerability.
Metrics
CVSS 4.0 Severity and Vector Strings:
CVSS 3.x Severity and Vector Strings:
No data available for CVSS Version 2.0 on this CVE.
CISA-ADP
Assessed Mar 3, 2026References to Advisories, Solutions, and Tools
By selecting these links, you will be leaving this site. These are references gathered from the official CVE record and are not endorsed by Volerion.
Weakness Enumeration
| CWE-ID | CWE Name | Source |
|---|---|---|
| CWE-79 | Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting') | [email protected] |
Affected Products
| Product | Versions |
|---|---|
| cure53 dompurify | >= 2.5.3, <= 2.5.8 >= 3.1.3, <= 3.3.1 |
CPE
Remediation
| |
Change History
7 change records found show changes
| Date | Action | Recorded By |
|---|---|---|
| Jun 17, 2026 | CVE Modified | CISA-ADP |
| Jun 17, 2026 | CVE Modified | [email protected] |
| Mar 25, 2026 | CVE Modified | [email protected] |
| Mar 25, 2026 | CVE Modified | [email protected] |
| Mar 5, 2026 | Initial Analysis | [email protected] |
| Mar 3, 2026 | CVE Modified | [email protected] |
| Mar 3, 2026 | New CVE Received | [email protected] |