Vulnerability · Published Oct 6, 2026 · Assigned by GitHub_M

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

Medium 4.7

In plain English

A medium-severity security flaw in handlebars.js from handlebars-lang. Proof-of-concept exploit code is public. The chance it is exploited in the next 30 days is estimated at 0.3% (higher than 22% of all known vulnerabilities). Fixed versions are available - upgrade the affected package.

Severity (CVSS 3.1)4.7Medium
Exploit odds (30 days)0.3%top 78.3% of all CVEs
Exploited in the wildNo reportsCISA SSVC: poc
Attack toolingNoneno public tooling known

Official 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.

Affected packages & fixed versions

EcosystemPackageFixed inAdvisory
Debian:12node-handlebarsno fix listedDEBIAN-CVE-2026-106444
Debian:13node-handlebarsno fix listedDEBIAN-CVE-2026-106444
Debian:14node-handlebars3:4.7.10-1DEBIAN-CVE-2026-106444
Ubuntu:22.04:LTSnode-handlebarsno fix listedUBUNTU-CVE-2026-106444
Ubuntu:24.04:LTSnode-handlebarsno fix listedUBUNTU-CVE-2026-106444
Ubuntu:26.04:LTSnode-handlebarsno fix listedUBUNTU-CVE-2026-106444
Ubuntu:26.10node-handlebarsno fix listedUBUNTU-CVE-2026-106444
Ubuntu:22.04:LTSruby-handlebars-assetsno fix listedUBUNTU-CVE-2026-106444
Ubuntu:24.04:LTSruby-handlebars-assetsno fix listedUBUNTU-CVE-2026-106444
npmhandlebars4.7.10GHSA-xw65-4hp5-5hc7

Affected products (as reported)

VendorProductVersions
handlebars-lang handlebars.js >= 4.0.0, < 4.7.10

Weakness: CWE-116 · Vector: CVSS:3.1/AV:N/AC:H/PR:N/UI:R/S:C/C:L/I:L/A:N

References