CVE-2026-0540
MEDIUM 5.3CVSS 4.0DOMPurify contains a Cross-site Scripting vulnerability
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.
- Published
- 3 Mar 2026
- Last modified
- 10 Sep 2026
- Assigned by
- help@fluidattacks.com
- NVD status
- Modified
- Weakness
- CWE-79
- Also known as
- GHSA-v2wj-7wpq-c8vv
- Sources
- NVDJSONOSV GHSA-v2wj-7wpq-c8vvJSON
Scores
| Source | Scored by | Version | Score | Vector / decision |
|---|---|---|---|---|
| NVD | help@fluidattacks.com (Secondary) | CVSS 4.0 | MEDIUM 5.3 | 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 |
| OSV | GitHub | CVSS 4.0 | CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:A/VC:N/VI:N/VA:N/SC:L/SI:L/SA:N | |
| NVD | help@fluidattacks.com (Secondary) | CVSS 3.1 | MEDIUM 6.1 | CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:L/I:L/A:N |
| OSV | GitHub | CVSS 3.1 | MEDIUM 6.1 | CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:L/I:L/A:N |
Affected
| Source | Vendor / ecosystem | Product / package | Affected versions | Fixed in |
|---|---|---|---|---|
| NVD | cure53 | dompurifycpe:2.3:a:cure53:dompurify:*:*:*:*:*:*:*:* |
>= 2.5.3, <= 2.5.8 | |
| NVD | cure53 | dompurifycpe:2.3:a:cure53:dompurify:*:*:*:*:*:*:*:* |
>= 3.1.3, <= 3.3.1 | |
| OSV | npm | dompurify | >= 3.1.3, < 3.3.2 | 3.3.2 |
| OSV | npm | dompurify | >= 2.5.3, < 2.5.9 | 2.5.9 |
References
- https://fluidattacks.com/advisories/daft · WEB
- https://github.com/cure53/DOMPurify · Product, PACKAGE
- https://github.com/cure53/DOMPurify/commit/302b51de22535cc90235472c52e3401bedd46f80 · WEB
- https://github.com/cure53/DOMPurify/releases/tag/3.3.2 · WEB
- https://www.vulncheck.com/advisories/dompurify-xss-via-missing-rawtext-elements-in-safe-for-xml · Third Party Advisory, WEB
- https://nvd.nist.gov/vuln/detail/CVE-2026-0540 · ADVISORY
- https://github.com/cure53/DOMPurify/commit/fca0a938b4261ddc9c0293a289935a9029c049f5 · WEB
History
- 25 Nov 2026 21:01 UTC · NVD: first stored (published 3 Mar 2026)
- 25 Nov 2026 20:11 UTC · OSV: first stored (published 3 Mar 2026)