CVE-2026-65902 Details
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.
A vulnerability exists in DOMPurify versions prior to 3.4.7, specifically in versions 3.4.5 and earlier. The issue arises because the library passes direct references to the module-level DEFAULT_ALLOWED_TAGS and DEFAULT_ALLOWED_ATTR sets into the uponSanitizeElement and uponSanitizeAttribute hooks. This occurs via data.allowedTags and data.allowedAttributes when the sanitize function is called without an explicit cfg.ALLOWED_TAGS or cfg.ALLOWED_ATTR array. Hooks that mutate these fields can permanently widen the default allow-lists for the lifetime of the DOMPurify instance. As a result, all subsequent sanitize calls using the default configuration inherit these widened defaults, allowing attacker payloads that exploit the modified tag or attribute names to survive the sanitization process. Notably, the methods removeAllHooks(), clearConfig(), and passing a fresh cfg do not restore the original state; only creating a new DOMPurify instance can revert the changes.
Users can upgrade to DOMPurify version 3.4.7 or later, where this vulnerability has been patched.
Metrics
CVSS 4.0 Severity and Vector Strings:
CVSS 3.x Severity and Vector Strings:
No data available for CVSS Version 2.0 on this CVE.
CISA-ADP
Assessed Jul 23, 2026References to Advisories, Solutions, and Tools
By selecting these links, you will be leaving this site. These are references gathered from the official CVE record and are not endorsed by Volerion.
| URL | Source(s) | Tag(s) |
|---|---|---|
| https://github.com/cure53/DOMPurify/security/advisories/GHSA-76mc-f452-cxcm | CISA-ADP | ExploitThird Party Advisory |
| https://github.com/cure53/DOMPurify/commit/7996f1dc78eb8b7922388aed75d94a9f8fad9a36 | [email protected] | Patch |
| https://github.com/cure53/DOMPurify/security/advisories/GHSA-76mc-f452-cxcm | [email protected] | ExploitThird Party Advisory |
| https://www.vulncheck.com/advisories/dompurify-before-hook-mutation-pollution-via-allowedtags | [email protected] | Third Party Advisory |
Weakness Enumeration
| CWE-ID | CWE Name | Source |
|---|---|---|
| CWE-501 | Trust Boundary Violation | [email protected] |
Affected Products
| Product | Versions |
|---|---|
| cure53 dompurify | < 3.4.7 |
CPE
Remediation
| |
Change History
3 change records found show changes
| Date | Action | Recorded By |
|---|---|---|
| Jul 28, 2026 | Initial Analysis | [email protected] |
| Jul 23, 2026 | New CVE Received | [email protected] |
| Jul 23, 2026 | CVE Modified | CISA-ADP |