CVE-2026-65902: Trust Boundary Violation in cure53 DOMPurify
DOMPurify before 3.4.7 (affected versions <= 3.4.5) passes direct references to the module-level DEFAULT_ALLOWED_TAGS and DEFAULT_ALLOWED_ATTR sets to the uponSanitizeElement and uponSanitizeAttribute hooks via data.allowedTags / data.allowedAttributes when sanitize is called without an explicit cfg.ALLOWED_TAGS / cfg.ALLOWED_ATTR array. A hook that mutates these fields permanently widens the default allow-lists for the lifetime of the DOMPurify instance, so all subsequent default-config sanitize calls inherit the widened defaults and attacker payloads using the poisoned tag/attribute name survive sanitization. removeAllHooks(), clearConfig(), and passing a fresh cfg do not recover the state; only constructing a new DOMPurify instance does.
AI Analysis
Technical Summary
CVE-2026-65902 describes a vulnerability in DOMPurify versions prior to 3.4.7 (<=3.4.5) where the module-level default allowed tags and attributes sets are passed by reference to sanitization hooks when sanitize is called without explicit allowed tags or attributes configuration. If a hook mutates these sets, it permanently widens the default allow-lists for that DOMPurify instance, causing subsequent sanitizations using default configurations to inherit the widened allow-lists. This allows attacker payloads using the poisoned tag or attribute names to survive sanitization. Attempts to recover the original state via removeAllHooks(), clearConfig(), or passing a fresh configuration do not work; only constructing a new DOMPurify instance resets the defaults.
Potential Impact
The vulnerability allows an attacker to bypass DOMPurify's sanitization by poisoning the default allowed tags or attributes lists via hooks, resulting in malicious tags or attributes surviving sanitization in all subsequent calls using default configurations on the same DOMPurify instance. This could lead to persistent cross-site scripting (XSS) or other injection attacks if the poisoned instance is reused. The impact is limited to applications using affected DOMPurify versions and relying on default sanitization configurations without recreating the DOMPurify instance.
Mitigation Recommendations
Patch status is not yet confirmed — check the vendor advisory for current remediation guidance. Until an official fix is available, the recommended mitigation is to avoid reusing the same DOMPurify instance after hooks that mutate allowed tags or attributes have been used. Constructing a new DOMPurify instance resets the allow-lists to their original state. Additionally, avoid using sanitize calls without explicit allowed tags or attributes configuration if hooks are involved.
CVE-2026-65902: Trust Boundary Violation in cure53 DOMPurify
Description
DOMPurify before 3.4.7 (affected versions <= 3.4.5) passes direct references to the module-level DEFAULT_ALLOWED_TAGS and DEFAULT_ALLOWED_ATTR sets to the uponSanitizeElement and uponSanitizeAttribute hooks via data.allowedTags / data.allowedAttributes when sanitize is called without an explicit cfg.ALLOWED_TAGS / cfg.ALLOWED_ATTR array. A hook that mutates these fields permanently widens the default allow-lists for the lifetime of the DOMPurify instance, so all subsequent default-config sanitize calls inherit the widened defaults and attacker payloads using the poisoned tag/attribute name survive sanitization. removeAllHooks(), clearConfig(), and passing a fresh cfg do not recover the state; only constructing a new DOMPurify instance does.
CVSS v4.0
Score 5.3medium
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
CVE-2026-65902 describes a vulnerability in DOMPurify versions prior to 3.4.7 (<=3.4.5) where the module-level default allowed tags and attributes sets are passed by reference to sanitization hooks when sanitize is called without explicit allowed tags or attributes configuration. If a hook mutates these sets, it permanently widens the default allow-lists for that DOMPurify instance, causing subsequent sanitizations using default configurations to inherit the widened allow-lists. This allows attacker payloads using the poisoned tag or attribute names to survive sanitization. Attempts to recover the original state via removeAllHooks(), clearConfig(), or passing a fresh configuration do not work; only constructing a new DOMPurify instance resets the defaults.
Potential Impact
The vulnerability allows an attacker to bypass DOMPurify's sanitization by poisoning the default allowed tags or attributes lists via hooks, resulting in malicious tags or attributes surviving sanitization in all subsequent calls using default configurations on the same DOMPurify instance. This could lead to persistent cross-site scripting (XSS) or other injection attacks if the poisoned instance is reused. The impact is limited to applications using affected DOMPurify versions and relying on default sanitization configurations without recreating the DOMPurify instance.
Mitigation Recommendations
Patch status is not yet confirmed — check the vendor advisory for current remediation guidance. Until an official fix is available, the recommended mitigation is to avoid reusing the same DOMPurify instance after hooks that mutate allowed tags or attributes have been used. Constructing a new DOMPurify instance resets the allow-lists to their original state. Additionally, avoid using sanitize calls without explicit allowed tags or attributes configuration if hooks are involved.
Technical Details
- Data Version
- 5.2
- Assigner Short Name
- VulnCheck
- Date Reserved
- 2026-07-23T11:03:13.092Z
- Cvss Version
- 4.0
- State
- PUBLISHED
- Remediation Level
- null
Threat ID: 6a6215a29c2644c7f82072e8
Added to database: 07/23/2026, 13:22:42 UTC
Last enriched: 07/30/2026, 22:47:33 UTC
Last updated: 09/07/2026, 10:52:10 UTC
Views: 75
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.