5.1medium
DOMPurify before 3.4.0 XSS via ADD_ATTR/ADD_TAGS State Leakage
- Severity
- 5.1medium CVSS:4.0 by VulnCheck
- Exploit likelihood
- 0.23% (higher than 15% of CVEs; EPSS, by FIRST)
- Published
- Last changed
- Assigned by
- VulnCheck
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.
Affected
| Product or package | Versions | Reported by |
|---|---|---|
| cure53 DOMPurify | before 3.4.0 Not affected: 3.4.0 | CVE List, NVD |
All scores
| VulnCheck | 5.1medium CVSS:4.0 | 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 |
| VulnCheck | 6.1medium CVSS:3.1 | CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:L/I:L/A:N |
Classification
SSVC (CISA-ADP): exploitation none, automatable yes, technical impact partial.
What each source says
CVE List
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.
NVD (es)
En DOMPurify hasta la versión 3.3.3, los predicados de función suministrados a través de ADD_ATTR o ADD_TAGS a DOMPurify.sanitize() persisten en el estado interno (EXTRA_ELEMENT_HANDLING) a través de llamadas posteriores a sanitize() en la misma instancia. Si una llamada posterior en la misma instancia proporciona ADD_ATTR o ADD_TAGS como un array en lugar de una función, el gestor de función previamente establecido no se borra ni se sobrescribe, por lo que continúa aprobando atributos o etiquetas controlados por el atacante. Esto puede permitir que atributos de gestor de eventos peligrosos o etiquetas prohibidas (eludiendo FORBID_TAGS) sobrevivan a la sanitización, lo que resulta en cross-site scripting. El proveedor (Cure53) considera esto un caso límite fuera del modelo de amenaza de DOMPurify; el aviso referenciado lista la versión 3.4.0 como la versión parcheada.
References
| https://github.com/cure53/DOMPurify/security/advisories/GHSA-9p3w-6h5p-cv75 | exploit, third-party-advisory, vendor-advisory | |
| https://www.vulncheck.com/advisories/dompurify-before-xss-via-add-attr-add-tags-state-leakage | third-party-advisory | |
Sources
| Source | Record | Licence |
|---|---|---|
| CVE List | CVE-2026-65911 changed 2026-07-27 | CVE Terms of Use |
| NVD | CVE-2026-65911 changed 2026-10-24 | Public domain |