CVE-2026-65904: Improper Check for Unusual or Exceptional Conditions in cure53 DOMPurify
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.
AI Analysis
Technical Summary
DOMPurify through version 3.3.3 improperly handles DOM elements originating from different windows or realms when sanitizing in IN_PLACE mode. The private _isNode() function uses a cross-realm instanceof check that returns false for foreign-realm nodes, leading DOMPurify to stringify the element, reset IN_PLACE to false silently, and return the unsanitized element unchanged. This behavior can leave cross-site scripting (XSS) payloads intact in the returned element. The vulnerability affects all versions before 3.3.4.
Potential Impact
The vulnerability allows DOMPurify to fail sanitizing DOM elements from foreign realms, potentially resulting in unsanitized elements containing XSS payloads being returned. This could enable cross-site scripting attacks if untrusted content from different windows or iframes is sanitized using the affected versions of DOMPurify in IN_PLACE mode. However, the CVSS score is low (2.3), indicating limited impact or exploitability.
Mitigation Recommendations
A fix is available in DOMPurify version 3.3.4 and later. Users should upgrade to version 3.3.4 or newer to address this issue. No official vendor advisory is provided in the input, so check the vendor's resources for confirmation and additional guidance.
CVE-2026-65904: Improper Check for Unusual or Exceptional Conditions in cure53 DOMPurify
Description
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.
CVSS v4.0
Score 2.3low
Affected software
Run on your own infrastructure? Check whether these packages are installed with threat-finder — our free open-source scanner.
AI-Powered Analysis
Machine-generated threat intelligence
Technical Analysis
DOMPurify through version 3.3.3 improperly handles DOM elements originating from different windows or realms when sanitizing in IN_PLACE mode. The private _isNode() function uses a cross-realm instanceof check that returns false for foreign-realm nodes, leading DOMPurify to stringify the element, reset IN_PLACE to false silently, and return the unsanitized element unchanged. This behavior can leave cross-site scripting (XSS) payloads intact in the returned element. The vulnerability affects all versions before 3.3.4.
Potential Impact
The vulnerability allows DOMPurify to fail sanitizing DOM elements from foreign realms, potentially resulting in unsanitized elements containing XSS payloads being returned. This could enable cross-site scripting attacks if untrusted content from different windows or iframes is sanitized using the affected versions of DOMPurify in IN_PLACE mode. However, the CVSS score is low (2.3), indicating limited impact or exploitability.
Mitigation Recommendations
A fix is available in DOMPurify version 3.3.4 and later. Users should upgrade to version 3.3.4 or newer to address this issue. No official vendor advisory is provided in the input, so check the vendor's resources for confirmation and additional guidance.
Technical Details
- Data Version
- 5.2
- Assigner Short Name
- VulnCheck
- Date Reserved
- 2026-07-23T11:03:13.093Z
- Cvss Version
- 4.0
- State
- PUBLISHED
- Remediation Level
- null
Threat ID: 6a6215a29c2644c7f82072f1
Added to database: 07/23/2026, 13:22:42 UTC
Last enriched: 07/30/2026, 22:47:49 UTC
Last updated: 09/04/2026, 10:52:10 UTC
Views: 103
Community Reviews
0 reviewsCrowdsource mitigation strategies, share intel context, and vote on the most helpful responses. Sign in to add your voice and help keep defenders ahead.
Want to contribute mitigation steps or threat intel context? Sign in or create an account to join the community discussion.
Actions
Updates to AI analysis require Pro Console access. Upgrade inside Console → Billing.
Need more coverage?
Upgrade to Pro Console for AI refresh and higher limits.
For incident response and remediation, OffSeq services can help resolve threats faster.
Latest Threats
Check if your credentials are on the dark web
Instant breach scanning across billions of leaked records. Free tier available.