Skip to main content
← All vulnerabilities
CVE-2026-65900GHSA-GVMJ-G25R-R7WR

DOMPurify before 3.4.8 Template Expression Injection via RETURN_DOM

Published
Last modified
published
Not listed in CISA KEV
Fix
Fixed in 3.4.8
None on Exploit-DB, Metasploit or GitHub
  • Exploitation: poc
  • Automatable: no
  • Technical impact: partial

Summary

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.

Timeline

  1. CVE published
  2. CISA SSVC assessment

    Exploitation: poc · Automatable: no · Technical impact: partial

  3. Record last updated

Affected versions

  • cure53 DOMPurify

    From 3.0.0 · fixed in 3.4.8

  • dompurifynpm

    From 3.0.0 · fixed in 3.4.8

References 2

GitHub · cure53/DOMPurify

vulncheck.com