Vulnerability · Published Jul 23, 2026 · Assigned by VulnCheck
CVE-2026-65902DOMPurify before 3.4.7 Hook Mutation Pollution via allowedTags
Medium 6.1
In plain English
A medium-severity security flaw in DOMPurify from cure53. Proof-of-concept exploit code is public. The chance it is exploited in the next 30 days is estimated at 0.4% (higher than 29% of all known vulnerabilities). Fixed versions are available - upgrade the affected package.
Official 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.
Affected packages & fixed versions
| Ecosystem | Package | Fixed in | Advisory |
|---|---|---|---|
| Debian:12 | node-dompurify | no fix listed | DEBIAN-CVE-2026-65902 |
| Debian:13 | node-dompurify | no fix listed | DEBIAN-CVE-2026-65902 |
| Debian:14 | node-dompurify | 3.4.12+dfsg-1 | DEBIAN-CVE-2026-65902 |
| Ubuntu:22.04:LTS | node-dompurify | no fix listed | UBUNTU-CVE-2026-65902 |
| Ubuntu:24.04:LTS | node-dompurify | no fix listed | UBUNTU-CVE-2026-65902 |
| Ubuntu:26.04:LTS | node-dompurify | no fix listed | UBUNTU-CVE-2026-65902 |
| npm | dompurify | 3.4.7 | GHSA-76mc-f452-cxcm |
Affected products (as reported)
Weakness: CWE-501 · Vector: CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:L/I:L/A:N
References
- GitHub Security Advisory (GHSA-76mc-f452-cxcm) vendor-advisory
- Patch Commit patch
- VulnCheck Advisory: DOMPurify before 3.4.7 Hook Mutation Pollution via allowedTags third-party-advisory