Dompurify · Dompurify · CVE-2026-65900
**Name of the Vulnerable Software and Affected Versions**
DOMPurify versions 3.0.0 through 3.4.7
**Description**
When configured with `SAFE FOR TEMPLATES` and a DOM output mode (`RETURN DOM`, `RETURN DOM FRAGMENT`, or `IN PLACE`), the software fails to strip template expressions such as `${evil}`, `{{evil}}`, or `<%evil%>` within `<template>` element content. This occurs because the ` scrubTemplateExpressions()` function uses a NodeIterator and `node.normalize()` that do not descend into `template.content`, allowing expressions formed by the merging of adjacent text nodes to survive sanitization. This bypasses the `SAFE FOR TEMPLATES` protection and may allow a downstream template engine to evaluate attacker-supplied expressions. The string output path is not affected.
**Recommendations**
Update DOMPurify to version 3.4.8 or later.