DOMPurify SAFE_FOR_TEMPLATES bypass: nested <form> makes a template expression reassemble when sanitized output is reparsed
Affected
| Package | Affected versions | Fixed in |
|---|---|---|
| npm:dompurify | < 3.5.0 | 3.5.0 |
With SAFE_FOR_TEMPLATES: true, DOMPurify 3.4.18 returns a string that contains no {{ or }}, yet becomes a live {{…}} expression as soon as it is assigned to innerHTML. A template engine that compiles that DOM (verified with Vue 3 in-DOM templates and AngularJS 1.8.3) evaluates the attacker's expression, giving arbitrary JavaScript execution. The attacker controls only the markup passed to sanitize(). The only configuration required is SAFE_FOR_TEMPLATES: true, which is a protective option used…
Read on GitHub Advisory Database
On 12/04/2026, 08:56 AM, GitHub Advisory Database published "DOMPurify SAFE_FOR_TEMPLATES bypass: nested <form> makes a template expression reassemble when sanitized output is reparsed" (type: Advisory). Severity is "High" (high). Related technologies: JavaScript / Node.js, Vue.js. CVE: CVE-2026-144292.