CVE-2026-65911 Details
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.
A cross-site scripting (XSS) vulnerability exists in DOMPurify versions through 3.3.3. The issue arises because function predicates provided via ADD_ATTR or ADD_TAGS to the DOMPurify.sanitize() method persist in the internal state across subsequent sanitize() calls on the same instance. If a later call uses ADD_ATTR or ADD_TAGS as an array instead of a function, the previously set function handler is not cleared or overwritten. This allows dangerous event-handler attributes or forbidden tags to survive the sanitization process, creating an opportunity for XSS attacks. The vulnerability is particularly severe because it can bypass explicit FORBID_TAGS configurations, allowing tags like <script> to remain after sanitization.
Users can upgrade to DOMPurify version 3.4.0 or later, where this vulnerability has been patched.
Metrics
CVSS 4.0 Severity and Vector Strings:
CVSS 3.x Severity and Vector Strings:
No data available for CVSS Version 2.0 on this CVE.
CISA-ADP
Assessed Jul 27, 2026References to Advisories, Solutions, and Tools
By selecting these links, you will be leaving this site. These are references gathered from the official CVE record and are not endorsed by Volerion.
| URL | Source(s) | Tag(s) |
|---|---|---|
| https://github.com/cure53/DOMPurify/security/advisories/GHSA-9p3w-6h5p-cv75 | [email protected] | ExploitThird Party Advisory |
| https://www.vulncheck.com/advisories/dompurify-before-xss-via-add-attr-add-tags-state-leakage | [email protected] | Third Party Advisory |
Weakness Enumeration
| CWE-ID | CWE Name | Source |
|---|---|---|
| CWE-79 | Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting') | [email protected] |
Affected Products
| Product | Versions |
|---|---|
| cure53 dompurify | < 3.4.0 |
CPE
Remediation
| |
Change History
3 change records found show changes
| Date | Action | Recorded By |
|---|---|---|
| Jul 28, 2026 | Initial Analysis | [email protected] |
| Jul 27, 2026 | CVE Modified | CISA-ADP |
| Jul 23, 2026 | New CVE Received | [email protected] |