CVE-2026-65911 DOMPurify before 3.4.0 XSS via ADD_ATTR/ADD_TAGS State Leakage

Medium 5.1 Published Updated

State leakage in DOMPurify allows XSS when mixing function and array configurations for ADD_ATTR or ADD_TAGS across sanitize calls.

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-65911?

CVE-2026-65911 is a medium-severity cross-site scripting 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

In DOMPurify through 3.3.3, function predicates supplied via ADD_ATTR or ADD_TAGS to DOMPurify.sanitize() persist in internal state (EXTRA_ELEMENT_HANDLING) across subsequent sanitize() calls on the same instance. If a later call on the same instance provides ADD_ATTR or ADD_TAGS as an array rather than a function, the previously set function handler is neither cleared nor overwritten, so it continues to approve attacker-controlled attributes or tags. This can allow dangerous event-handler attributes or forbidden tags (bypassing FORBID_TAGS) to survive sanitization, resulting in cross-site scripting. The vendor (Cure53) considers this an edge case outside DOMPurify's threat model; the referenced advisory lists 3.4.0 as the patched version.

Weakness: CWE-79

Which versions are affected by CVE-2026-65911?

It affects 1 product.

Products include Cure53 Dompurify.

How do I fix CVE-2026-65911?

Upgrade to a fixed version.

Escape output for the context it lands in and set a strict Content Security Policy. Upgrading the affected component is the real fix. More about Cross-site scripting.

Is CVE-2026-65911 being exploited?

There is no known exploitation of CVE-2026-65911 in the wild and no public exploit code.

Sources

Also known as DEBIAN-CVE-2026-65911, GHSA-9p3w-6h5p-cv75, UBUNTU-CVE-2026-65911.

Is CVE-2026-65911 in your software?

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

Check your SBOMs for free