CVE-2026-65902
CVE-2026-65902 · DOMPurify before 3.4.7 Hook Mutation Pollution via allowedTags
This page contains facts from public vulnerability sources. Check the original advisory before updating.
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 5.3 · Medium · EPSS 0.4% · Fix available
- Published
- Updated
Affected products and versions
dompurify
- Versions
- ≥ 0, < 3.4.7: Affected (semver)
- 3.4.7: Not affected (semver)
Update to 3.4.7
node-dompurify Debian:12
- Versions
- 2.4.1+dfsg+~2.4.0-1
- 2.4.1+dfsg+~2.4.0-2
- 2.4.1+dfsg+~2.4.0-2+deb12u1
- 3.0.9+dfsg+~3.0.5-1
- 3.1.6+dfsg+~3.0.5-1
- 3.1.7+dfsg+~3.0.5-1
- 3.1.7+dfsg+~3.0.5-2
- 3.2.5+dfsg-1
- 3.3.2+dfsg-1
- 3.3.3+dfsg-1
- 3.3.3+dfsg-2
- 3.4.1+dfsg-1
- 3.4.12+dfsg-1
- 3.4.13+dfsg-1
- 3.4.13+dfsg-2
- 3.4.16+dfsg-1
- 3.4.2+dfsg-1
- 3.4.5+dfsg-1
- Affected ranges
- ECOSYSTEM: (−∞, +∞)
No fix published
node-dompurify Debian:13
- Versions
- 3.1.7+dfsg+~3.0.5-2
- 3.2.5+dfsg-1
- 3.3.2+dfsg-1
- 3.3.3+dfsg-1
- 3.3.3+dfsg-2
- 3.4.1+dfsg-1
- 3.4.12+dfsg-1
- 3.4.13+dfsg-1
- 3.4.13+dfsg-2
- 3.4.16+dfsg-1
- 3.4.2+dfsg-1
- 3.4.5+dfsg-1
- Affected ranges
- ECOSYSTEM: (−∞, +∞)
No fix published
node-dompurify Debian:14
- Versions
- 3.1.7+dfsg+~3.0.5-2
- 3.2.5+dfsg-1
- 3.3.2+dfsg-1
- 3.3.3+dfsg-1
- 3.3.3+dfsg-2
- 3.4.1+dfsg-1
- 3.4.2+dfsg-1
- 3.4.5+dfsg-1
- Affected ranges
- ECOSYSTEM: < 3.4.12+dfsg-1
Update to 3.4.12+dfsg-1
dompurify npm
- Affected ranges
- SEMVER: < 3.4.7
Update to 3.4.7
node-dompurify Ubuntu:22.04:LTS
- Versions
- 2.3.0+dfsg-2
- 2.3.3+dfsg-1
- Affected ranges
- ECOSYSTEM: (−∞, +∞)
No fix published
node-dompurify Ubuntu:24.04:LTS
- Versions
- 2.4.1+dfsg+~2.4.0-1
- 3.0.9+dfsg+~3.0.5-1
- Affected ranges
- ECOSYSTEM: (−∞, +∞)
No fix published
node-dompurify Ubuntu:26.04:LTS
- Versions
- 3.1.7+dfsg+~3.0.5-2
- 3.3.3+dfsg-1
- Affected ranges
- ECOSYSTEM: (−∞, +∞)
No fix published