Attack ChainAIDerived
Hypothetical attack flow derived from CVE metadata – not a confirmed exploit chain
-
AccessControl or inject content into same-origin cross-realm iframe
-
DeliveryApplication retrieves malicious element via iframe.contentDocument
-
ExploitApplication invokes DOMPurify with IN_PLACE mode on foreign-realm element
-
Execution_isNode() instanceof check fails cross-realm
-
PersistDOMPurify returns original unsanitized element
-
ImpactXSS payload executes in victim's browser session
Vulnerability Assessment
| Weakness |
CWE
OWASP Top 10:2025
A10:2025 - Mishandling of Exceptional Conditions
ASVS 5.0
V16 - Security Logging and Error Handling Unusual condition handling
|
| Exploitation Conditions | Exploitation requires two simultaneous application-level conditions to be met: first, the application must explicitly invoke DOMPurify with the IN_PLACE mode option enabled - this is not the default behavior and must be deliberately configured by the developer; second, the DOM element passed to DOMPurify must originate from a different JavaScript realm, specifically from a cross-realm document such as an iframe's contentDocument, a popup window opened via window.open(), or any other browsing context with a distinct window/global object. Standard DOMPurify usage - passing HTML strings, or passing same-realm DOM nodes - is entirely unaffected by this vulnerability. Exploitation is further constrained by the attacker's need to control or inject content into the cross-realm document (requiring either a same-origin relationship with the iframe source or another injection vector), and by the requirement for user interaction (UI:P) to load and trigger the affected page. The vendor's explicit scoping of this as outside the threat model confirms these conditions are edge-case rather than mainstream usage patterns. |
| Impact | The CVSS 4.0 score of 2.3 is intentionally low and accurately reflects genuine exploitation constraints: AC:H captures the prerequisite that the calling application must be architected to retrieve DOM elements from a cross-realm context, AT:P encodes the specific attack condition (IN_PLACE mode explicitly enabled plus cross-realm element source), and UI:P requires victim interaction with the vulnerable page. The score's subsequent-system impact (SC:L/SI:L) reflects that successful exploitation results in limited XSS in the victim's browser session rather than server-side compromise. No EPSS data was provided; given AC:H and AT:P, real-world exploitation probability is assessed as low, as it depends on a narrow application architecture pattern. No KEV listing has been confirmed, and no public POC exploit has been identified at time of analysis. The material risk amplifier is the vendor's explicit refusal to patch - all DOMPurify deployments through 3.3.3 remain permanently exposed to this specific bypass without an upstream fix, which shifts remediation burden entirely to application developers. Security teams should prioritize this issue proportionally: low immediate exploitation risk, but architecturally significant for applications that explicitly use IN_PLACE mode with cross-frame content. |
| Exploit ScenarioDerived | An attacker who can influence content within a same-origin iframe targeted by a web application retrieves a malicious DOM element from that iframe's contentDocument and ensures the application passes it to DOMPurify with IN_PLACE mode enabled. Because DOMPurify's instanceof check fails across realm boundaries, the XSS payload embedded in the element survives sanitization and is inserted into the parent document, executing arbitrary script in the victim's browser session. No public POC has been identified at time of analysis, but the bypass mechanism is described with sufficient technical specificity in the vendor advisory to be independently reproducible. |
Get an e-mail when this CVE is exploited, patched or re-scored. Free account.
Alert meAnalysisAIv1 – Jul 23, 2026
DOMPurify's IN_PLACE sanitization mode silently bypasses XSS filtering when processing DOM elements sourced from a different JavaScript window context (e.g., an iframe's contentDocument), returning the unsanitized element - payloads intact - to the calling application. The private _isNode() function's instanceof check fails for foreign-realm nodes because prototype chains belong to distinct window objects, causing DOMPurify to misidentify the input, disable IN_PLACE mode silently, and pass through unfiltered content. The vendor has explicitly declined to issue a fix, categorizing this as outside DOMPurify's threat model, leaving all versions through 3.3.3 permanently exposed without a vendor-supplied remediation path.
RemediationAI
No vendor-released patch exists and none is planned - the vendor considers this an edge case outside DOMPurify's defined threat model, confirmed by the advisory at https://github.com/cure53/DOMPurify/security/advisories/GHSA-4w3q-35jp-p934. The primary mitigation is to discontinue use of DOMPurify's IN_PLACE mode with DOM elements sourced from cross-realm contexts (iframes, popup windows, or any distinct browsing context). Applications should serialize foreign-realm content to an HTML string before passing it to DOMPurify (e.g., use element.outerHTML as input rather than the element itself); this trades a minor performance benefit for guaranteed sanitization. If IN_PLACE processing of cross-realm elements is architecturally unavoidable, implement a pre-check that validates instanceof against the element's own ownerDocument.defaultView before invoking DOMPurify, and reject or re-serialize elements that fail this check. Deploying a strict Content Security Policy (CSP) with script-src restrictions will not prevent the bypass but limits downstream XSS impact by constraining what injected scripts can do. Migrating cross-realm sanitization workflows to a Trusted Types policy or a DOMParser-based approach in the current window context are viable architectural alternatives for high-security deployments. No exact fix version can be cited because no patch is available.
Affected VersionsENISA
Affected Packages
Source: OSV (Open Source Vulnerabilities)
Affects your stack
Affects 1 package in euvd
Checking this CVE against your own stacks and servers is part of the Basic plan and up.
Technical ContextAI · show details
DOMPurify (CPE: cpe:2.3:a:cure53:dompurify:*:*:*:*:*:*:*:*) is a widely embedded JavaScript XSS sanitization library by Cure53, typically used to strip dangerous HTML and script content before rendering untrusted markup. Its IN_PLACE mode allows sanitization of live DOM nodes directly rather than processing HTML strings, which is more efficient but introduces realm-sensitivity. The root cause maps to CWE-754 (Improper Check for Unusual or Exceptional Conditions): the private _isNode() function performs a standard JavaScript instanceof check, which silently returns false when the node's prototype chain originates from a different realm (window/global object). This is a known JavaScript platform limitation - cross-realm type checking with instanceof is unreliable without explicit cross-realm guard logic. DOMPurify does not account for this case in its IN_PLACE code path, so rather than raising an error or refusing to process the node, it stringifies the element (producing '[object HTMLDivElement]'), silently resets the IN_PLACE flag to false, and returns the original DOM node unmodified. Any XSS payload embedded in that node survives the sanitization call entirely intact.
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
CVSS:4.0/AV:N/AC:H/AT:P/PR:N/UI:P/VC:N/VI:N/VA:N/SC:L/SI:L/SA:N
AC:H reflects the cross-realm DOM architecture requirement; UI:R for victim page interaction; S:C and C:L/I:L capture limited XSS impact on the victim's browser session.
Primary rating from Vendor (VulnCheck).
CVSS VectorVendor: VulnCheck
Lifecycle Timeline
2DescriptionCVE.org
DOMPurify through 3.3.3 fails to sanitize DOM elements passed via IN_PLACE mode when the element originates from a different window/realm (e.g., an iframe's contentDocument). A cross-realm instanceof check in the private _isNode() function returns false for foreign-realm nodes, causing DOMPurify to stringify the element (yielding '[object HTMLDivElement]'), silently reset IN_PLACE to false, and return the unsanitized element unchanged with any XSS payloads intact. The vendor considers this an edge case outside DOMPurify's threat model and, at time of publication, no fix was planned.
Threat Intelligence Overview
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.
What every action level means
SSVC AssessmentENISA
Priority Score
Attack Technique
Cross-Site Scripting occurs when an application accepts untrusted data and sends it to a web browser without proper validation or encoding.
DOMPurify is a DOM-only, super-fast, uber-tolerant XSS sanitizer for HTML, MathML and SVG. Rated medium severity (CVSS 6
Cure53 DOMPurify before 2.0.17 allows mutation XSS. Rated medium severity (CVSS 6.1), this vulnerability is remotely exp
DOMPurify before 2.0.1 allows XSS because of innerHTML mutation XSS (mXSS) for an SVG element or a MATH element, as demo
DOMPurify is a DOM-only, super-fast, uber-tolerant XSS sanitizer for HTML, MathML and SVG. Rated critical severity (CVSS
Mutation-XSS in DOMPurify before 3.3.2 enables JavaScript execution in victim browsers when sanitized output is re-inser
Hook mutation pollution in DOMPurify <= 3.4.5 allows persistent bypass of HTML sanitization defaults when application-in
Trusted Types policy state contamination in DOMPurify 3.0.0-3.4.8 allows a previously supplied TRUSTED_TYPES_POLICY to s
Prototype pollution in DOMPurify's USE_PROFILES mode enables DOM-based XSS by causing the sanitizer to accept event hand
URI validation bypass in DOMPurify 3.3.1 and earlier allows `javascript:` protocol payloads to survive HTML sanitization
SAFE_FOR_TEMPLATES bypass in DOMPurify 3.0.0-3.4.7 allows template expressions such as ${evil}, {{evil}}, and <%evil%> t
Cross-site scripting in DOMPurify 3.4.6 and earlier enables script execution when the library's IN_PLACE sanitization mo
Stored XSS is achievable in applications using DOMPurify's setConfig() API combined with an uponSanitizeAttribute hook t
EUVD-2026-48273
NVD
CVE.org
EPSS
Vulnrichment
GitHub
VulDB
Exploit-DB