CVE-2026-65899 DOMPurify before 3.4.9 Trusted Types Policy State Contamination
DOMPurify fails to reset Trusted Types policy state, allowing script execution via reused instances bound to unsafe policies.
- Exploited in the wild
- Not known
- Login needed
- Not needed
- Attackable
- Over the internet
- Victim action needed
- A user has to click or open something
- Fix
- Available
What is CVE-2026-65899?
CVE-2026-65899 is a medium-severity vulnerability in cure53 DOMPurify, published on 23 Jul 2026. An attacker can exploit it over the internet without logging in, and only if a user opens a file or follows a link.
Official description
DOMPurify 3.0.0 before 3.4.9 does not reset the retained Trusted Types policy when clearConfig() is called, so a DOMPurify instance reused across trust boundaries stays bound to a previously supplied TRUSTED_TYPES_POLICY. A later caller that requests RETURN_TRUSTED_TYPE output receives a TrustedHTML object created by the old (potentially unsafe) policy rather than a clean default, which can lead to script execution at a Trusted Types sink. Passing TRUSTED_TYPES_POLICY: null on the later call also does not clear the retained policy.
Weakness: CWE-693
Which versions are affected by CVE-2026-65899?
2 open source packages ship an affected version, including dompurify. It affects 1 product.
| Package | Affected | Fixed in |
|---|---|---|
dompurify npm | All versions | 3.4.9 |
dompurify npm | All versions | 3.4.9 |
Products include Cure53 Dompurify.
How do I fix CVE-2026-65899?
Upgrade dompurify to 3.4.9 or later.
Is CVE-2026-65899 being exploited?
There is no known exploitation of CVE-2026-65899 in the wild and no public exploit code.
Other vulnerabilities in cure53 DOMPurify
- CVE-2024-47875 DOMPurify nesting-based mXSS
- CVE-2024-48910 DOMPurify vulnerable to tampering by prototype polution
- CVE-2026-47423 DOMPurify XSS via `selectedcontent` re-clone
- CVE-2024-45801 Tampering by prototype polution in DOMPurify
- CVE-2026-49978 DOMPurify IN_PLACE Sanitization Bypass via Attached Shadow Root Inside <template>.content
Sources
Also known as DEBIAN-CVE-2026-65899, ECHO-c3fd-1cde-4135, GHSA-vxr8-fq34-vvx9, MINI-2339-gvqj-pgx8, MINI-35vj-mh4c-5f7h, MINI-3f2j-vm92-r68v and 16 more.