Skip to main content
VulnerabilityPublished Updated

CVE-2026-0540: cure53 DOMPurify · XSS or 'Cross-site Scripting'

Affects cure53 DOMPurifySource CVE Database V5

0
Compare

Not known to be exploited · CVSS 5.3 Medium.

Data as of 30 Oct 2026, 06:59 UTC

CVSS 4.0 base score
5.3Medium
How severe the flaw is on the 0–10 CVSS scale.
EPSS
0.3% chance of exploitation in 30 days – higher than 32% of CVEsExploit Prediction Scoring System: the likelihood attackers will use this flaw soon.
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

Exploitation evidence

  1. Disclosed: evidence found.

    CVE published 3 Mar 2026

  2. Detectable: no evidence on record.

    No public nuclei template indexed

  3. Weaponized: no evidence on record.

    No public exploit code indexed in Metasploit or Exploit-DB

  4. Exploited in the wild: no evidence on record.

    Not in CISA KEV and no source reports exploitation

  5. Observed by OffSeq 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 29 Oct 2026.

What to do

Affected software

ProductAffectedFixed in
cure53DOMPurifyAffected
  • >=3.1.3 <=3.3.1
  • >=2.5.3 <=2.5.8
Fixed in–
npmdompurifypkg:npm/dompurifyOther threatsAffected
  • =3.1.3
  • =2.5.3
Fixed in–

Check your own hosts for these packages with threat-finder (opens in a new tab), our free open-source scanner.

AI-suggested

Organizations should immediately upgrade DOMPurify to a patched version that includes the fix from commit 729097f or later (versions beyond 3.3.1 or 2.5.8). If upgrading is not immediately feasible, applying custom patches to the SAFE_FOR_XML regex to include the missing rawtext elements (noscript, xmp, noembed, noframes, iframe) can serve as a temporary mitigation. Additionally, web developers should implement defense-in-depth by employing Content Security Policy (CSP) headers to restrict script execution and reduce the impact of potential XSS attacks. Input validation and output encoding should be reinforced on the server side, especially for any user-generated content that is rendered in browsers. Regular security testing, including automated scanning for XSS vulnerabilities and manual code reviews of sanitization logic, is recommended. Monitoring web application logs for unusual script execution or injection attempts can help detect exploitation attempts early. Finally, educating developers about the limitations of client-side sanitization and encouraging the use of multiple layers of security controls will improve overall resilience.

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.

References

Community reviews

Loading reviews…