Skip to main content
VulnerabilityPublished Updated

CVE-2026-66010: DOMPurify · `CUSTOM_ELEMENT_HANDLING` bypasses `afterSanitizeElements` for allowed custom elements

Affects dompurifySource GCVE Database

0

Mentioned vulnerabilities

CVSS 2.1 Low : upgrade to 3.4.12 when convenient.

Data as of 3 Oct 2026, 18:24 UTC

CVSS 4.0 base score
2.1Low
How severe the flaw is on the 0–10 CVSS scale.
Patch
Available – fixed in 3.4.12
CVSS:4.0/AV:N/AC:H/AT:N/PR:N/UI:A/VC:N/VI:N/VA:N/SC:L/SI:L/SA:N

What to do

Upgrade dompurify to 3.4.12.

Affected software

ProductAffectedFixed in
npmdompurifyAffected
  • <3.4.12
Fixed in
  • 3.4.12

Check your own hosts for these packages with threat-finder (opens in a new tab), our free open-source scanner.

AI-suggested

A patch is available in DOMPurify version 3.4.12 that addresses this issue. Users should upgrade to version 3.4.12 or later to ensure that allowed custom elements are properly sanitized and the afterSanitizeElements hook is applied consistently. No additional mitigation is required if the update is applied.

Description

DOMPurify 3.4.11 has a hook-policy inconsistency involving the CUSTOM_ELEMENT_HANDLING configuration. Allowed custom elements bypass the afterSanitizeElements hook, which may cause sensitive attributes to be preserved on these elements while being removed from normal elements. This can lead to a second-order XSS vulnerability if the custom element later injects these attributes into an HTML sink such as innerHTML. This is not a direct DOMPurify XSS but a potential security policy bypass. A fix is available in versions 3.4.12 and later.

References

Community reviews

Loading reviews…