CVE-2026-106446 Handlebars: JavaScript Injection via AST Type Confusion in compile (Program.blockParams)
Attackers can execute arbitrary JavaScript in the server process by supplying malicious AST objects to Handlebars compile functions.
- Exploited in the wild
- Not known
- Login needed
- Not needed
- Attackable
- Over the internet
- Victim action needed
- Not needed
- Fix
- Available
What is CVE-2026-106446?
CVE-2026-106446 is a critical code injection vulnerability in handlebars-lang handlebars.js, published on 6 Oct 2026. An attacker can exploit it over the internet without logging in, with no action from the victim.
Official description
Handlebars provides the power necessary to let users build semantic templates. From 4.0.0 until 4.7.10, Handlebars.compile() and Handlebars.precompile() accept pre-parsed AST objects while validating only selected PathExpression, NumberLiteral, and BooleanLiteral values. This issue bypasses the AST validation introduced in version 4.7.9 for CVE-2026-33937. An attacker who can supply an object instead of a template string can place JavaScript expressions in unchecked values such as Program.blockParams.length, a non-PathExpression parameter depth, a non-string StringLiteral.value, or a non-string PathExpression.original. The compiler emits those values into generated JavaScript, causing code execution in the server process when compile output renders or wherever precompile output is loaded. Applications that pass only template strings are not affected. This issue is fixed in version 4.7.10.
Which versions are affected by CVE-2026-106446?
2 open source packages ship an affected version, including handlebars.
| Package | Affected | Fixed in |
|---|---|---|
handlebars npm | From 4.0.0 | 4.7.10 |
handlebars npm | From 4.0.0 | 4.7.10 |
How do I fix CVE-2026-106446?
Upgrade handlebars to 4.7.10 or later.
Upgrade, and never evaluate templates, expressions or code built from user input. More about Code injection.
Is CVE-2026-106446 being exploited?
It is not confirmed as exploited in the wild, but public exploit code for CVE-2026-106446 exists.
Sources
Also known as CLEANSTART-2026-VO75724, CLSA-2026-1791795528, CLSA-2026-1791814907, DEBIAN-CVE-2026-106446, ECHO-c5bc-f0e3-77a6, GHSA-8r5x-fm3f-whwj and 13 more.