CVE-2026-65902
Description
DOMPurify before 3.4.7 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.
Weakness
- CWE-501: Trust Boundary Violation
CISA SSVC decision points
| Exploitation | poc |
|---|---|
| Automatable | no |
| Technical impact | partial |
| Scored | 2026-07-23 |
Timeline
- 2026-06-15GitHub advisory published (GHSA-76mc-f452-cxcm)38 days before publication
- 2026-07-23Published by the CNA13:16 UTC
- 2026-07-23CISA SSVC decision recordedsame day
Exploit and advisory records
GitHub advisory GHSA-76mc-f452-cxcm, affected packages:
| Package | Vulnerable versions | Fixed in |
|---|---|---|
| npm dompurify | before 3.4.7 | 3.4.7 |
Affected products
Products listed as vulnerable. Upgrade to the version under "Fixed in", or a later one.
| Product | Vulnerable versions | Fixed in |
|---|---|---|
| cure53 dompurify | before 3.4.7fixed in 3.4.7 | 3.4.7 |
References
- https://github.com/cure53/DOMPurify/commit/7996f1dc78eb8b7922388aed75d94a9f8fad9a36
- https://github.com/cure53/DOMPurify/security/advisories/GHSA-76mc-f452-cxcm
- https://www.vulncheck.com/advisories/dompurify-before-hook-mutation-pollution-via-allowedtags
Get more CVE data from the API.
curl 'https://api.contrastcyber.com/cve_lookup/CVE-2026-65902'curl 'https://api.contrastcyber.com/cve_risk_score/CVE-2026-65902'curl 'https://api.contrastcyber.com/cve_exploit/CVE-2026-65902'curl 'https://api.contrastcyber.com/cve_products/CVE-2026-65902'
Sources
- Vulnerability data from the National Vulnerability Database (NIST) and the CVE Program. CVE records: Copyright © 1999-2026, The MITRE Corporation, used under the CVE Program Terms of Use. CVE® is a registered trademark of The MITRE Corporation.
- CWE definitions: Copyright © 2006-2026, The MITRE Corporation, used under the CWE Terms of Use. CWE is a trademark of The MITRE Corporation.
- OWASP Top 10 categories by the OWASP Foundation (CC BY 3.0).
- EPSS scores by FIRST.org EPSS, used with attribution.
- KEV catalog and SSVC decisions by CISA.
- Advisory data from the GitHub Advisory Database through OSV.dev (CC BY 4.0).
- Exploit metadata from the Exploit Database (GPL-2.0-only, metadata only).
- Nuclei template names from nuclei-templates (MIT).