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

Published Jul 23, 2026
·
Updated

In DOMPurify through 3.3.3, function predicates supplied via ADDATTR or ADDTAGS to DOMPurify.sanitize() persist in internal state (EXTRAELEMENTHANDLING) across subsequent sanitize() calls on the same instance. If a later call on the same instance provides ADDATTR or ADDTAGS 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 FORBIDTAGS) 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.

Affected Software

1 affected component
DOMPurify DOMPurify<=3.3.3

Remediation

Recommended actions to resolve this vulnerability, in priority order.

  1. Upgrade

    Upgrade DOMPurify to a version that resolves this vulnerability.

    Fixed in 3.4.0
  2. Configuration

    Ensure that for a given DOMPurify instance, ADD_ATTR and ADD_TAGS are provided consistently (as function predicates) on each sanitize() call. Do not pass ADD_ATTR/ADD_TAGS as an array on later calls after providing function handlers, to avoid function predicate state (EXTRA_ELEMENT_HANDLING) persisting across calls in versions through 3.3.3.

    DOMPurify.sanitize() (ADD_ATTR/ADD_TAGS usage) ADD_ATTR/ADD_TAGS handling across calls = Use function predicates consistently; do not switch to array form on the same DOMPurify instance

Event History

Jul 23, 2026
CVE Published
via MITRE·01:16 PM
Data Sourced
via MITRE·01:16 PM
DescriptionSeverityWeakness
Data Sourced
via NVD·02:18 PM
DescriptionSeverityWeakness
Free Weekly Intel

Don't miss critical vulnerabilities

Join thousands of security professionals who receive our weekly digest of trending CVEs, zero-days, and exploited vulnerabilities.

No spam. Unsubscribe anytime.

Frequently Asked Questions

1

What is the severity of CVE-2026-65911?

The severity of CVE-2026-65911 is rated as medium with a score of 6.1.

2

How do I fix CVE-2026-65911?

To mitigate CVE-2026-65911, update DOMPurify to version 3.4.0 or later.

3

What type of vulnerability is CVE-2026-65911?

CVE-2026-65911 is an XSS (Cross-Site Scripting) vulnerability.

4

What software is affected by CVE-2026-65911?

CVE-2026-65911 affects versions of DOMPurify prior to 3.4.0.

5

How does CVE-2026-65911 occur?

CVE-2026-65911 occurs due to state leakage from function predicates supplied via ADD_ATTR or ADD_TAGS in DOMPurify.

Contact

SecAlerts Pty Ltd.
132 Wickham Terrace
Fortitude Valley,
QLD 4006, Australia
info@secalerts.co
By using SecAlerts services, you agree to our services end-user license agreement. This website is safeguarded by reCAPTCHA and governed by the Google Privacy Policy and Terms of Service. All names, logos, and brands of products are owned by their respective owners, and any usage of these names, logos, and brands for identification purposes only does not imply endorsement. If you possess any content that requires removal, please get in touch with us.
© 2026 SecAlerts Pty Ltd.
ABN: 70 645 966 203, ACN: 645 966 203