CVE-2026-0540
Last modified
CVE-2026-0540 is a medium-severity vulnerability rated 6.1/10 on the CVSS scale. 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.. EPSS estimates a 0.28% chance of exploitation in the next 30 days.
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.
Metrics
CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:L/I:L/A:N
CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:P/VC:N/VI:N/VA:N/SC:L/SI:L/SA:N/E:X/CR:X/IR:X/AR:X/MAV:X/MAC:X/MAT:X/MPR:X/MUI:X/MVC:X/MVI:X/MVA:X/MSC:X/MSI:X/MSA:X/S:X/AU:X/R:X/V:X/RE:X/U:X
Weakness Enumeration
Affected Software
| Vendor | Product | Versions |
|---|---|---|
| Cure53 | Dompurify | >= 2.5.3, <= 2.5.8 |
| Cure53 | Dompurify | >= 3.1.3, <= 3.3.1 |
References
Timeline
- Published
- Last Modified
- Status
- Modified
Frequently Asked Questions
What is CVE-2026-0540?
How severe is CVE-2026-0540?
How do I fix CVE-2026-0540?
How Strix Helps
- How Strix found a critical auth bypass in etcdStrix autonomously discovered a critical authentication bypass in etcd, later designated CVE-2026-33413.
- Autonomous PentestingAI agents that find and validate exploitable vulnerabilities like this one across your applications.
- PR ReviewsPentest every pull request so vulnerable code is caught before it ships to production.
- AI Penetration TestingHow AI-driven penetration testing continuously covers your attack surface.
Related CVEs from 2026
- CVE-2026-0534A maliciously crafted HTML payload, stored in a part’s attri…8.1
- CVE-2026-0535A maliciously crafted HTML payload, stored in a component’s …8.1
- CVE-2026-0536A maliciously crafted GIF file, when parsed through Autodesk…7.8
- CVE-2026-0537A maliciously crafted RGB file, when parsed through Autodesk…8.4
- CVE-2026-0538A maliciously crafted GIF file, when parsed through Autodesk…8.4
- CVE-2026-0539Incorrect Default Permissions in pcvisit service binary on W…8.5
- CVE-2026-0541ACAP applications can gain elevated privileges due to improp…7.3
- CVE-2026-0542ServiceNow has addressed a remote code execution vulnerabili…9.2
- CVE-2026-0543Improper Input Validation (CWE-20) in Kibana's Email Connect…6.5
- CVE-2026-0544A security flaw has been discovered in itsourcecode School M…9.8
- CVE-2026-0545In mlflow/mlflow, the FastAPI job endpoints under `/ajax-api…9.8
- CVE-2026-0546A vulnerability was determined in code-projects Content Mana…9.8
Are you affected by CVE-2026-0540?
Run a free Strix scan to check your systems for this vulnerability.
Scan your code nowSource: NVD / NIST
