CVE-2026-65899 DOMPurify before 3.4.9 Trusted Types Policy State Contamination

Medium 5.1 Published Updated

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.

PackageAffectedFixed in
dompurify npmAll versions3.4.9
dompurify npmAll versions3.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.

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.

Is CVE-2026-65899 in your software?

Upload an SBOM and sbomify checks it against every vulnerability here, every day.

Check your SBOMs for free