---
id: CVE-2026-116804
title: >-
  DOMPurify from 3.4.4 before 3.4.17 SAFE_FOR_TEMPLATES Bypass via Shadow Root
  Content
summary: >-
  DOMPurify from 3.4.4 before 3.4.17 contains a SAFE_FOR_TEMPLATES bypass that
  lets attackers preserve template expressions in attached shadow roots when
  using RETURN_DOM, RETURN_DOM_FRAGMENT, or IN_PLACE modes. Attackers can split
  express…
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.4 < 3.4.17
published: '2026-10-26'
updated: '2026-10-26'
sourceUpdated: '2026-10-26T23:05:35.850Z'
source: CVEORG
sourceUrl: 'https://www.cve.org/CVERecord?id=CVE-2026-116804'
references:
  - url: >-
      https://github.com/cure53/DOMPurify/security/advisories/GHSA-cg2g-xh64-v4q7
    label: GitHub Security Advisory (GHSA-cg2g-xh64-v4q7)
  - url: >-
      https://www.vulncheck.com/advisories/dompurify-from-3.4.4-before-3.4.17-safe-for-templates-bypass-via-shadow-root-content
    label: >-
      VulnCheck Advisory: DOMPurify from 3.4.4 before 3.4.17 SAFE_FOR_TEMPLATES
      Bypass via Shadow Root Content
tags:
  - cve.org
epss: 0.00178
epssPercentile: 0.07348
ingestedAt: '2026-10-27T16:11:59.140Z'
---

## Overview

DOMPurify from 3.4.4 before 3.4.17 contains a SAFE_FOR_TEMPLATES bypass that lets attackers preserve template expressions in attached shadow roots when using RETURN_DOM, RETURN_DOM_FRAGMENT, or IN_PLACE modes. Attackers can split expressions across text nodes separated by disallowed elements, which merge after removal and are evaluated by downstream template engines for cross-site scripting.

## Affected

- `DOMPurify >= 3.4.4 < 3.4.17`

## Remediation

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