freenode

← CVE tracker

CVE-2026-144292

DOMPurify SAFE_FOR_TEMPLATES bypass: nested <form> makes a template expression reassemble when sanitized output is reparsed

Severity
high CVSS 7.6 (v4.0)
Affects
DOMPurify · cure53
Weakness
CWE-79: Improper Neutralization of Input During Web Page Generation
Published
3 December 2026 by GitHub_M
DOMPurify is a DOM-only cross-site scripting sanitizer for HTML, MathML, and SVG. Prior to 3.5.0, DOMPurify.sanitize() with SAFE_FOR_TEMPLATES can return attacker-controlled markup whose brace fragments remain separated during sanitization but become adjacent when nested form elements are reparsed through innerHTML. A template engine that compiles the reparsed DOM can evaluate the reconstructed expression, allowing arbitrary JavaScript execution in the page origin. Plain unsplit template expressions remain scrubbed, and exploitation requires the sanitized output to be reparsed and compiled by a template engine. This issue is fixed in version 3.5.0.

Our coverage

We have not written about this one. Know why it matters? Send a tip.