Node dompurify: DOMPurify 3.1.3 through 3.3.1 and 2.5.3 through 2.5.8, fixed in commit 729097f, contain a cross-site
Affects node-dompurifySource GCVE Database
Not known to be exploited · CVSS 5.3 Medium.
Data as of 27 Oct 2026, 06:42 UTC
CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:P/VC:N/VI:N/VA:N/SC:L/SI:L/SA:NExploitation evidence
Disclosed: evidence found.
CVE published 3 Mar 2026
Detectable: no evidence on record.
No public nuclei template indexed
Weaponised: no evidence on record.
No public exploit code indexed in Metasploit or Exploit-DB
Exploited in the wildExploited: no evidence on record.
Not in CISA KEV and no source reports exploitation
Observed by OffSeq MirageSeen by Mirage: no evidence on record.
No attack traffic recorded by OffSeq Mirage sensors
A missing step is not evidence of safety. Sources: cve.org (opens in a new tab), the Metasploit, Exploit-DB and nuclei-templates index as of 26 Oct 2026.
What to do
Affected software
| Product | Affected | Fixed in |
|---|---|---|
Ubuntu 26.10node-dompurifypkg:deb/ubuntu/node-dompurify?arch=source&distro=stonkingOther threats | Affected
| Fixed in– |
Ubuntu 26.04 LTSnode-dompurifypkg:deb/ubuntu/node-dompurify?arch=source&distro=resoluteOther threats | Affected
| Fixed in– |
Ubuntu 25.10node-dompurifypkg:deb/ubuntu/node-dompurify?arch=source&distro=questingOther threats | Affected
| Fixed in– |
Ubuntu 24.04 LTSnode-dompurifypkg:deb/ubuntu/node-dompurify?arch=source&distro=nobleOther threats | Affected
| Fixed in– |
Ubuntu 22.04 LTSnode-dompurifypkg:deb/ubuntu/node-dompurify?arch=source&distro=jammyOther threats | Affected
| Fixed in– |
Check your own hosts for these packages with threat-finder (opens in a new tab), our free open-source scanner.
Description
DOMPurify 3.1.3 through 3.3.1 and 2.5.3 through 2.5.8, fixed in commit 729097f, 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.
References
- ubuntu.com/security/CVE-2026-0540 (opens in a new tab)
- cve.org/CVERecord?id=CVE-2026-0540 (opens in a new tab)
- github.com/cure53/DOMPurify (opens in a new tab)
- github.com/cure53/DOMPurify/commit/fca0a938b4261ddc9c0293a289935a9029c049f5 (opens in a new tab)
- vulncheck.com/advisories/dompurify-xss-via-missing-rawtext-elements-in-safe-for-xml (opens in a new tab)