CVE-2026-65899: DOMPurify before 3.4.9 Trusted Types Policy State Contamination
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 TRUSTEDTYPESPOLICY. A later caller that requests RETURNTRUSTEDTYPE 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 TRUSTEDTYPESPOLICY: null on the later call also does not clear the retained policy.
Affected Software
Remediation
Recommended actions to resolve this vulnerability, in priority order.
- Upgrade
Upgrade
DOMPurifyto a version that resolves this vulnerability.Fixed in 3.4.9 - Operational
Do not reuse a single DOMPurify instance across trust boundaries; create a new DOMPurify instance per trust boundary to avoid retained TRUSTED_TYPES_POLICY state contamination (v3.0.0 through before 3.4.9).
Event History
Frequently Asked Questions
What is the severity of CVE-2026-65899?
CVE-2026-65899 has a medium severity rating of 6.1.
How do I fix CVE-2026-65899?
To fix CVE-2026-65899, upgrade DOMPurify to version 3.4.9 or later.
What is the impact of CVE-2026-65899?
The impact of CVE-2026-65899 is that it allows for Trusted Types policy state contamination across trust boundaries.
What software is affected by CVE-2026-65899?
CVE-2026-65899 affects versions of DOMPurify prior to 3.4.9.
When was CVE-2026-65899 published?
CVE-2026-65899 was published on July 23, 2026.