Skip to main content

DOMPurify CVE-2026-65914

| EUVDEUVD-2026-48277 MEDIUM
Cross-site Scripting (XSS) (CWE-79)
2026-07-23 VulnCheck
5.3
CVSS 4.0 · Vendor: VulnCheck
View

Attack ChainAIDerived

Hypothetical attack flow derived from CVE metadata – not a confirmed exploit chain

  1. Recon
    Craft mXSS payload with wrapper-closing sequence in attribute
  2. Delivery
    Submit to application input processed by DOMPurify
  3. Exploit
    Payload survives sanitization unmodified
  4. Install
    Application concatenates sanitized output into xmp/noscript/iframe wrapper string
  5. C2
    Application writes wrapper string to innerHTML
  6. Execute
    Browser reparses in special-element context, payload mutates
  7. Impact
    Injected event handler executes JavaScript in victim browser

Vulnerability Assessment

Weakness
CWE
OWASP Top 10:2025
A05:2025 - Injection
ASVS 5.0
V1 - Encoding and Sanitization Output encoding, context-aware escaping
MITRE ATT&CK

2 techniques across 2 tactics: Initial Access, Execution

The technique list with ATT&CK links and the kill-chain view is part of the Basic plan and up.

Exploitation Conditions

Exploitation requires both conditions to be true simultaneously: (1) the application uses DOMPurify in a version prior to 3.3.2, AND (2) the application re-inserts DOMPurify-sanitized HTML into the DOM via innerHTML using one of the confirmed special wrapper elements - script, xmp, iframe, noembed, noframes, or noscript. This wrapper re-contextualization is an application-level pattern, not a default DOMPurify behavior; applications that set innerHTML directly without wrapping, or that use other insertion methods such as textContent, are not affected by this specific flaw. User interaction (CVSS UI:P) is required - a victim must load or interact with the page that performs the vulnerable reparse. No authentication or server-side privileges are required from the attacker (PR:N), as the payload is delivered through attacker-controlled input to the sanitization function. Exploitation is therefore scoped to web applications with this specific non-default rendering architecture.

Impact

The CVSS 4.0 score of 5.3 (SC:L/SI:L with VC:N/VI:N/VA:N) accurately reflects that impact is limited to the victim's browser session via subsequent-system JavaScript execution - not server-side or infrastructure compromise. UI:P (user interaction required) and the prerequisite of a specific application-level usage pattern (re-insertion into wrapper elements) are meaningful limiting factors. However, the existence of a working public PoC - confirmed in GHSA-h8r8-wccr-v5f2 - materially elevates exploitability above what the score alone suggests. DOMPurify's widespread adoption as a de facto standard sanitization library means the blast radius across the ecosystem is significant even if only a subset of deployments use the vulnerable wrapper reinsertion pattern. No CISA KEV listing exists, so confirmed mass exploitation is unverified. EPSS data was not provided in the input. Real-world priority is moderate-to-high for any application using DOMPurify for client-side sanitization and piping output through innerHTML with the listed wrapper elements - the PoC lowers the bar for opportunistic exploitation.

Exploit ScenarioDerived

An attacker submits a crafted payload - such as <img src=x alt="</xmp><img src=x onerror=alert('xss')"> - to a web application that sanitizes user input with DOMPurify and then writes the sanitized string into a page via innerHTML wrapped in an xmp element. DOMPurify passes the payload through unchanged, as the </xmp> sequence inside the alt attribute is not flagged in the initial parse context. When the application's innerHTML assignment triggers a second browser parse under the xmp wrapper context, the </xmp> closes the wrapper early and the injected <img onerror=...> is instantiated as a live DOM node, executing arbitrary JavaScript in the victim's browser. A complete working demonstration application is included in the GHSA advisory.

This Month Plan within 30 days. Why: MEDIUM severity (CVSS 4.0-6.9).
Patch available 0.3% exploitation probability (EPSS)

Get an e-mail when this CVE is exploited, patched or re-scored. Free account.

Alert me

AnalysisAIv1 – Jul 23, 2026

Mutation-XSS in DOMPurify before 3.3.2 enables JavaScript execution in victim browsers when sanitized output is re-inserted into the DOM via innerHTML using wrapper elements such as xmp, noscript, iframe, noembed, noframes, or script. Attacker-controlled payloads containing wrapper-closing sequences (e.g., </xmp>) survive DOMPurify sanitization intact but mutate during the browser's second parse, breaking out of the wrapper context and activating injected event handlers. A working public proof-of-concept is confirmed in the GHSA advisory; no CISA KEV listing at time of analysis.

RemediationAI

Upgrade DOMPurify to version 3.3.2 or later using npm install dompurify@3.3.2 - this is the vendor-released patch confirmed by the cure53 GitHub Security Advisory GHSA-h8r8-wccr-v5f2 (https://github.com/cure53/DOMPurify/security/advisories/GHSA-h8r8-wccr-v5f2). As a compensating control where immediate upgrade is not feasible, eliminate re-insertion of sanitized output via innerHTML inside the confirmed vulnerable wrapper elements (script, xmp, iframe, noembed, noframes, noscript) - this removes the second parse context that triggers mutation; trade-off is that it may require refactoring rendering logic. Alternatively, sanitize the full composed string (wrapper included) rather than sanitizing content before wrapper concatenation, though this approach is brittle and not a substitute for patching. Using textContent for trusted text fragments instead of innerHTML avoids parser re-entry entirely where markup rendering is not needed. Upgrading to 3.3.2 is the only reliable remediation.

Affected VersionsENISA

DOMPurify 0 <3.3.2

Affected Packages

npm dompurify fix: 3.3.2

Source: OSV (Open Source Vulnerabilities)

Affects your stack

Affects 1 package in npm

Checking this CVE against your own stacks and servers is part of the Basic plan and up.

Technical ContextAI · show details

DOMPurify (npm: dompurify, CPE: cpe:2.3:a:cure53:dompurify:*:*:*:*:*:*:*:*) is a JavaScript HTML sanitization library maintained by cure53. The root cause is CWE-79 (Improper Neutralization of Input During Web Page Generation) arising from a classic mXSS re-contextualization pattern: DOMPurify correctly sanitizes input in one HTML parsing context, but the application subsequently injects the sanitized string into a second, semantically different context via innerHTML combined with HTML5 'special element' wrappers. Per HTML5 parsing rules, elements like xmp and noscript suppress normal tag parsing within their content, treating the interior as raw text. An attacker-controlled attribute value embedding a closing sequence (e.g., </xmp>) causes the browser to terminate the special context prematurely during the second parse, re-exposing attacker markup - such as <img onerror=alert()> - as active DOM nodes outside the original attribute boundary. The sanitizer never sees the second parse and therefore cannot intercept the mutation.

Know when Dompurify gets its next vulnerability

  • Watch products and get an email when something new is published
  • Check this CVE against your own stack and servers
  • Exploit and PoC references, threat intelligence from 22 sources

No credit card · 7-day full trial

Severity by source

Vendor (VulnCheck) PRIMARY 5.3 MEDIUM
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
vuln.today AI 6.1 MEDIUM

Network-reachable with no auth required, but user interaction and scope change apply as JavaScript executes in victim browser context with no server-side impact.

3.1 AV:N/AC:L/PR:N/UI:R/S:C/C:L/I:L/A:N
4.0 AV:N/AC:L/AT:N/PR:N/UI:P/VC:N/VI:N/VA:N/SC:L/SI:L/SA:N
SUSE 6.1 HIGH
AV:N/AC:L/PR:N/UI:R/S:C/C:L/I:L/A:N
Red Hat 5.4 MEDIUM

Primary rating from Vendor (VulnCheck).

CVSS VectorVendor: VulnCheck

Attack Vector
Network
Attack Complexity
Low
Attack Requirements
None
Privileges Required
None
User Interaction
Passive
Vulnerable system: Confidentiality
None
Vulnerable system: Integrity
None
Vulnerable system: Availability
None
Subsequent system: Confidentiality
Low
Subsequent system: Integrity
Low
Subsequent system: Availability
None

Lifecycle Timeline

2
Patch available
Jul 23, 2026 - 15:18 EUVD
CVE Published
Jul 23, 2026 - 13:16 cve.org
MEDIUM 5.3

DescriptionCVE.org

DOMPurify before 3.3.2 contains a mutation-XSS vulnerability when sanitized HTML is reinserted into special parsing contexts using innerHTML with wrappers like script, xmp, iframe, noembed, noframes, or noscript. Attackers can craft payloads with closing sequences that break out of the wrapper context during reparsing, reactivating dangerous markup with event handlers to execute JavaScript.

Blast Radius

ecosystem impact
† from your stack dependencies † transitive graph · vuln.today resolves 4-path depth
  • 287 npm packages depend on dompurify (25 direct, 262 indirect)

Ecosystem-wide dependent count for version 3.3.2.

Threat Intelligence Overview

EPSS Score
0.3%
Top 81% exploitable
Prevalence
High
de facto standard JS HTML sanitization library, ubiquitous npm dependency
Exploit
POC
Public exploit code exists
Data Quality
6 sources
Confidence: High
EUVD NVD CVE.org EPSS Vulnrichment Vendor GitHub VulDB

How this decision was reached

The engine reads each signal below and applies a fixed list of rules from top to bottom. The first rule that matches sets the recommended action – like a statement, every line is shown.

SignalValue
Severity MEDIUM
CISA KEV No
Public POC Yes
EPSS 0.3%
Patch available Yes
Active threat No
Deciding rule
MEDIUM severity (CVSS 4.0-6.9)
What every action level means
Emergency Immediate action required. Criteria: CRITICAL + in CISA KEV (actively exploited) without patch, OR CRITICAL + EPSS > 30% without patch, OR CRITICAL + active threat signals without patch.
Act Now Prioritize within 24-48h. Criteria: in KEV with patch available, OR CRITICAL + public POC, OR HIGH + EPSS > 10%, OR CRITICAL + active threat, OR any CRITICAL severity.
This Week Schedule remediation this week. Criteria: HIGH severity (CVSS 7.0-8.9). Patch within normal change window.
This Month Plan within 30 days. Criteria: MEDIUM severity (CVSS 4.0-6.9), lower exploitation probability. Include in regular patch cycle.
Monitor Track and reassess. Criteria: LOW severity (CVSS 0.1-3.9), minimal exploitation risk. No immediate action needed.

SSVC AssessmentENISA

SSVC Decision· derived
Scheduled
Exploitation
Poc
System Exposure· derived
Open
Automatable
No
Human Impact· derived
High
Technical Impact
Partial

Priority Score

46
Low Medium High Critical
KEV: 0
EPSS: 0
CVSS: +26
PoC: +20
Weaponized: 0
Threat intel: 0
Gov advisory: 0

Attack Technique

Cross-Site Scripting occurs when an application accepts untrusted data and sends it to a web browser without proper validation or encoding.

CVE-2024-47875 MEDIUM POC
6.1 Oct 11

DOMPurify is a DOM-only, super-fast, uber-tolerant XSS sanitizer for HTML, MathML and SVG. Rated medium severity (CVSS 6

CVE-2020-26870 MEDIUM POC
6.1 Oct 07

Cure53 DOMPurify before 2.0.17 allows mutation XSS. Rated medium severity (CVSS 6.1), this vulnerability is remotely exp

CVE-2019-16728 MEDIUM POC
6.1 Sep 24

DOMPurify before 2.0.1 allows XSS because of innerHTML mutation XSS (mXSS) for an SVG element or a MATH element, as demo

CVE-2024-48910 CRITICAL
9.8 Oct 31

DOMPurify is a DOM-only, super-fast, uber-tolerant XSS sanitizer for HTML, MathML and SVG. Rated critical severity (CVSS

CVE-2026-65902 MEDIUM POC
5.3 Jul 23

Hook mutation pollution in DOMPurify <= 3.4.5 allows persistent bypass of HTML sanitization defaults when application-in

CVE-2026-65899 MEDIUM POC
5.1 Jul 23

Trusted Types policy state contamination in DOMPurify 3.0.0-3.4.8 allows a previously supplied TRUSTED_TYPES_POLICY to s

CVE-2026-65913 MEDIUM POC
5.1 Jul 23

Prototype pollution in DOMPurify's USE_PROFILES mode enables DOM-based XSS by causing the sanitizer to accept event hand

CVE-2026-65912 MEDIUM POC
5.1 Jul 23

URI validation bypass in DOMPurify 3.3.1 and earlier allows `javascript:` protocol payloads to survive HTML sanitization

CVE-2026-65900 MEDIUM POC
5.1 Jul 23

SAFE_FOR_TEMPLATES bypass in DOMPurify 3.0.0-3.4.7 allows template expressions such as ${evil}, {{evil}}, and <%evil%> t

CVE-2026-65901 MEDIUM POC
5.1 Jul 23

Cross-site scripting in DOMPurify 3.4.6 and earlier enables script execution when the library's IN_PLACE sanitization mo

CVE-2026-65898 MEDIUM POC
5.1 Jul 23

Stored XSS is achievable in applications using DOMPurify's setConfig() API combined with an uponSanitizeAttribute hook t

CVE-2025-26791 MEDIUM POC
4.5 Feb 14

DOMPurify before 3.2.4 has an incorrect template literal regular expression, sometimes leading to mutation cross-site sc

Vendor StatusVendor

SUSE

Severity: Important
Product Status
SUSE Linux Enterprise Module for SAP Applications 15 SP7 Affected
SUSE Linux Enterprise Server 16.0 Affected
SUSE Linux Enterprise Server 16.1 Affected
SUSE Linux Enterprise Server for SAP Applications 15 SP7 Affected
SUSE Linux Enterprise Server for SAP applications 16.0 Affected

This site uses cookies essential for authentication and security. No tracking or analytics cookies are used. Privacy Policy