Skip to content

CVE-2026-106444 Handlebars: JavaScript Injection via Unsafe Inline Embedding of Precompiled Templates

MediumCVSS 4.7 EPSS 0.29%
Published
Updated
Exploit status
No public exploit known
CISA SSVC
Proof of concept public · automatable: no · technical impact: partial
Technology
UbuntuDebianRed Hat

Description

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.

Upgrade path

11 packages: 2 fixed, 8 with no fix yet.

PackageAffectedFixed inStatus
azure linux python-nbdime(Azure Linux 4.0) All versions No fix listed No fix yet
debian/node-handlebars(Debian 12) = 3:4.7.7+~4.1.0-1; = 3:4.7.9-1; = 3:4.7.9-2; = 3:4.7.9-3 +5 more No fix listed No fix yet
debian/node-handlebars(Debian 13) = 3:4.7.7+~4.1.0-1; = 3:4.7.9-1; = 3:4.7.9-2; = 3:4.7.9-3 +5 more No fix listed No fix yet
ubuntu/node-handlebars(Ubuntu 22.04) All versions No fix listed No fix yet
ubuntu/node-handlebars(Ubuntu 24.04) All versions No fix listed No fix yet
ubuntu/node-handlebars(Ubuntu 26.04) All versions No fix listed No fix yet
ubuntu/node-handlebars(Ubuntu 26.10) All versions No fix listed No fix yet
ubuntu/ruby-handlebars-assets(Ubuntu 24.04) All versions No fix listed No fix yet
debian/node-handlebars(Debian 14) < 3:4.7.10-1; = 3:4.7.7+~4.1.0-1; = 3:4.7.9-1; = 3:4.7.9-2 +4 more 3:4.7.10-1 Fixed
npm handlebars(npm) >= 4.0.0, < 4.7.10; >= 4.0.0, <= 4.7.9 4.7.10 Fixed
handlebars-lang handlebars.js = >= 4.0.0, < 4.7.10 No fix listed Versions listed

Affected products

ProductAffected versionsFixed in
handlebars-lang handlebars.js = >= 4.0.0, < 4.7.10 No fix listed
debian/node-handlebars(Debian:12) All versions No fix listed
debian/node-handlebars(Debian:12) = 3:4.7.10-1 No fix listed
debian/node-handlebars(Debian:12) = 3:4.7.7+~4.1.0-1 No fix listed
debian/node-handlebars(Debian:12) = 3:4.7.9-1 No fix listed
debian/node-handlebars(Debian:12) = 3:4.7.9-2 No fix listed
debian/node-handlebars(Debian:12) = 3:4.7.9-3 No fix listed
debian/node-handlebars(Debian:12) = 3:4.7.9-4 No fix listed
debian/node-handlebars(Debian:12) = 3:4.7.9-5 No fix listed
debian/node-handlebars(Debian:12) = 3:4.7.9-6 No fix listed
debian/node-handlebars(Debian:13) All versions No fix listed
debian/node-handlebars(Debian:13) = 3:4.7.10-1 No fix listed
debian/node-handlebars(Debian:13) = 3:4.7.7+~4.1.0-1 No fix listed
debian/node-handlebars(Debian:13) = 3:4.7.9-1 No fix listed
debian/node-handlebars(Debian:13) = 3:4.7.9-2 No fix listed
debian/node-handlebars(Debian:13) = 3:4.7.9-3 No fix listed
debian/node-handlebars(Debian:13) = 3:4.7.9-4 No fix listed
debian/node-handlebars(Debian:13) = 3:4.7.9-5 No fix listed
debian/node-handlebars(Debian:13) = 3:4.7.9-6 No fix listed
debian/node-handlebars(Debian:14) < 3:4.7.10-1 3:4.7.10-1
debian/node-handlebars(Debian:14) = 3:4.7.7+~4.1.0-1 No fix listed
debian/node-handlebars(Debian:14) = 3:4.7.9-1 No fix listed
debian/node-handlebars(Debian:14) = 3:4.7.9-2 No fix listed
debian/node-handlebars(Debian:14) = 3:4.7.9-3 No fix listed
debian/node-handlebars(Debian:14) = 3:4.7.9-4 No fix listed
Show 10 more
ProductAffected versionsFixed in
debian/node-handlebars(Debian:14) = 3:4.7.9-5 No fix listed
debian/node-handlebars(Debian:14) = 3:4.7.9-6 No fix listed
npm handlebars(npm) >= 4.0.0, <= 4.7.9 No fix listed
ubuntu/node-handlebars(Ubuntu:22.04) All versions No fix listed
ubuntu/node-handlebars(Ubuntu:24.04) All versions No fix listed
ubuntu/ruby-handlebars-assets(Ubuntu:24.04) All versions No fix listed
ubuntu/node-handlebars(Ubuntu:26.04) All versions No fix listed
ubuntu/node-handlebars(Ubuntu:26.10) All versions No fix listed
npm handlebars(npm) >= 4.0.0, < 4.7.10 4.7.10
azure linux python-nbdime(Azure Linux:4.0) All versions No fix listed

References