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

- **Severity:** Critical 9.8 (`CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H`)
- **Exploited in the wild:** Not known
- **Login needed:** Not needed
- **Attackable:** Over the internet
- **Victim action needed:** Not needed
- **Fix available:** Yes
- **Published:** 6 Oct 2026
- **Updated:** 7 Oct 2026
- **Also known as:** CLEANSTART-2026-VO75724, CLSA-2026-1791795528, CLSA-2026-1791814907, DEBIAN-CVE-2026-106446, ECHO-c5bc-f0e3-77a6, GHSA-8r5x-fm3f-whwj, MINI-23mm-wqrp-2788, MINI-2jfg-wqwx-4jfr, MINI-34gr-r6fx-7m8g, MINI-7c2j-vf28-hg55, MINI-cj3g-r3xf-jm9h, MINI-gj23-53r6-mr8h, MINI-hjrg-98v4-jqwp, MINI-hpr7-fgj5-5qf4, MINI-vrfh-pghh-8pf4, MINI-vvj7-rxrv-h3xg, MINI-xqq7-x5c5-wm83, ROOT-APP-NPM-CVE-2026-106446, UBUNTU-CVE-2026-106446

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

Weakness: CWE-94 (Improper Control of Generation of Code), CWE-843 (Access of Resource Using Incompatible Type)

## Which versions are affected by CVE-2026-106446?

2 open source packages ship an affected version, including handlebars.


| Package | Ecosystem | 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.

## Is CVE-2026-106446 being exploited?

It is not confirmed as exploited in the wild, but public exploit code for CVE-2026-106446 exists.

## Fix prompt for AI coding agents

```text
Check this codebase for CVE-2026-106446 and fix it if it is affected.

What it is: 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.
Exploitation: It is not confirmed as exploited in the wild, but public exploit code for CVE-2026-106446 exists.

Affected packages and fixed versions:
- handlebars (npm): affected from 4.0.0; fixed in 4.7.10
- handlebars (npm): affected from 4.0.0; fixed in 4.7.10

Task:
1. Search the dependency manifests and lockfiles (for example package.json, package-lock.json, requirements.txt, poetry.lock, uv.lock, pom.xml, build.gradle, go.mod, Cargo.lock, Gemfile.lock) and any Dockerfiles for the affected packages, including transitive dependencies.
2. If an affected version is in use, upgrade it to the fixed version for its release line with the project's package manager, so the lockfile is regenerated. Prefer the smallest upgrade that fixes it.
3. If there is no fix, or the upgrade would break the build, do not guess: explain the risk and the safest workaround instead.
4. Run the tests and summarise what changed and why.
5. If nothing in the project is affected, say so and change nothing.

Reference: https://insights.sbomify.com/CVE-2026-106446/ (Markdown: https://insights.sbomify.com/CVE-2026-106446/index.md)
```

## Sources

- CVE record: https://www.cve.org/CVERecord?id=CVE-2026-106446
- NVD: https://nvd.nist.gov/vuln/detail/CVE-2026-106446
- OSV: https://osv.dev/vulnerability/CVE-2026-106446

---
From sbomify Insights: https://insights.sbomify.com/CVE-2026-106446/
Summaries are generated and may contain mistakes; the official description above is the record.
