Vulnerability
CVE-2026-106444
Handlebars provides the power necessary to let users build semantic templates. From 4.0.0 until 4.7.10, Handlebars.precompile() uses quotedString() in lib/handlebars/compiler/code-gen.js to emit static template text into generated JavaScript without escaping sequences that terminate an enclosing HTML script element. When an application precompiles attacker-controlled template text and embeds the generated source directly in an inline script element, a closing script delimiter can end the element and cause following attacker-controlled markup to be parsed and executed. Ordinary server-side rendering and precompiled templates served as external JavaScript files are not affected. This issue is fixed in version 4.7.10.
92 advisories report this vulnerability, across 6 ecosystems.
Advisories in Wolfi
- CGA-2rw6-pw8q-6rc7
- CGA-365w-49qf-jwv6
- CGA-3663-3m92-w9c8
- CGA-3g82-pjw4-f387
- CGA-52p6-h28h-wv63
- CGA-92vh-xmvw-36vg
- CGA-9hwc-v4w9-v7ff
- CGA-9q8f-pmgx-h3p5
- CGA-cmqh-r2xh-9p7g
- CGA-crxp-4hfj-6gwh
- CGA-ffc6-fq9v-mrq3
- CGA-h4gv-wgw5-gvhx
- CGA-h8hv-xm95-f8x7
- CGA-mvx3-pq85-28ff
- CGA-pg4c-g92q-7xq8
- CGA-pjhv-597j-xpww
- CGA-wf76-4cpf-69x5
- CGA-wjm5-rc56-vm74
- CGA-wvcj-g6mc-x5fr
- CGA-xwm9-7fm9-hmf8
References
- https://github.com/handlebars-lang/handlebars.js/commit/609d1b11c833c9a3e00f56f2f34d22f425446725
- https://github.com/handlebars-lang/handlebars.js/pull/2185
- https://github.com/handlebars-lang/handlebars.js/releases/tag/v4.7.10
- https://github.com/handlebars-lang/handlebars.js/security/advisories/GHSA-xw65-4hp5-5hc7