---
id: CVE-2026-66010
title: DOMPurify before 3.4.12 Hook Bypass via CUSTOM_ELEMENT_HANDLING
summary: >-
  DOMPurify before 3.4.12 fails to execute afterSanitizeElements hook for custom
  elements allowed via CUSTOM_ELEMENT_HANDLING.tagNameCheck, allowing attributes
  to bypass application security policies. Attackers can preserve sensitive
  attri…
severity: medium
cvss: 6.1
cvssVector: 'CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:L/I:L/A:N'
cvssSource: cna
cwe:
  - CWE-79
vendor: cure53
product: DOMPurify
affected:
  - DOMPurify < 3.4.12
ssvc:
  exploitation: poc
  automatable: 'no'
  technicalImpact: partial
  timestamp: '2026-07-24T14:13:53.590696Z'
exploitAvailable: true
published: '2026-07-24'
updated: '2026-09-17'
sourceUpdated: '2026-09-17T17:54:37.884Z'
source: CVEORG
sourceUrl: 'https://www.cve.org/CVERecord?id=CVE-2026-66010'
references:
  - url: >-
      https://github.com/cure53/DOMPurify/security/advisories/GHSA-c2j3-45gr-mqc4
    label: GitHub Security Advisory (GHSA-c2j3-45gr-mqc4)
  - url: >-
      https://www.vulncheck.com/advisories/dompurify-before-hook-bypass-via-custom-element-handling
    label: >-
      VulnCheck Advisory: DOMPurify before 3.4.12 Hook Bypass via
      CUSTOM_ELEMENT_HANDLING
tags:
  - cve.org
  - exploit-available
epss: 0.00215
epssPercentile: 0.12216
ingestedAt: '2026-09-17T18:25:16.054Z'
---

## Overview

DOMPurify before 3.4.12 fails to execute afterSanitizeElements hook for custom elements allowed via CUSTOM_ELEMENT_HANDLING.tagNameCheck, allowing attributes to bypass application security policies. Attackers can preserve sensitive attributes on custom elements that later re-inject them into innerHTML sinks, creating second-order XSS gadgets.

## Affected

- `DOMPurify < 3.4.12`

## Remediation

Refer to the linked advisories for vendor-supplied fixes and affected version ranges.
