Categories
CVE-2026-106446 critical CVSS 9.8

Code Injection in handlebars (CVE-2026-106446)

Summary

Code injection in handlebars (CVE-2026-106446). Successful exploitation can lead to full system takeover. Exploitable via PathExpression. Mitigation: upgrade to 4.7.10 or later.

Original description

The description as published by the source.

Summary

Handlebars.compile() and Handlebars.precompile() accept a pre-parsed AST as well as a template string. Handlebars 4.7.9 added validation for such ASTs. It only checks values on PathExpression, NumberLiteral and BooleanLiteral nodes, and the compiler still writes several other AST values into the generated JavaScript unchecked.

If an application passes an untrusted object to compile() or precompile(), such as a parsed JSON request body, that object can carry arbitrary JavaScript. With compile(), the code runs on the server when the template renders. With precompile(), it ends up in the precompiled output and runs wherever that output is loaded.

Applications that only ever pass template strings are not affected.

This bypasses the AST validation added in 4.7.9 for GHSA-2w6w-674q-4c4q, GHSA-xhpv-hc6g-r9c6 and GHSA-3mfm-83xf-c92r.

Details

The 4.7.9 validator runs in parseWithoutProcessing() and walks the whole AST. It only checks values on nodes whose type is PathExpression, NumberLiteral or BooleanLiteral. It passes over plain objects without a type, and over strings and other non-object values. The compiler reads these values from other places and writes them into the generated code as-is:

AST value Written into generated code as Compile options needed
Program.blockParams.length container.program(, data, ) none (default options)
depth on a param that is not a PathExpression, e.g.…

Source: NIST National Vulnerability Database NVD GitHub Advisory

Auto-generated summary

Assembled by SecPulse from the source data (CVSS, CWE, affected versions) using templates — no AI involved. Check the original description and references below for exact details.

A vulnerability tracked as CVE-2026-106446 has been found in handlebars.
Attackers can target a specific entry point like PathExpression over the network to misuse the product.
Successful exploitation can lead to full system takeover. CVSS score: 9.8/10.
What to do: upgrade handlebars to 4.7.10 or later.
If unsure, ask your IT team or search "handlebars CVE-2026-106446" on the vendor's site.

CVE-2026-106446 (handlebars) — CWE-94 / CVSS v3 9.8
Attack vector: remote (network-reachable) / unauthenticated / no user interaction
Attack surface: PathExpression / NumberLiteral / BooleanLiteral / type
Patched: 4.7.10 — apply immediately
Plan: 1) Audit SBOM/dependencies, 2) Stage→prod upgrade, 3) Add WAF/proxy monitoring on affected endpoints, 4) Hunt IOCs in logs.
Refs: see the GHSA / vendor advisory / patched release linked on this page.

❓ What is the problem

Arbitrary code execution (CWE-94) exists in handlebars. Attackers reach the vulnerable code path via PathExpression without authentication.

📍 Affected scope

Check the vendor advisory for the affected versions of handlebars. Attack surface: PathExpression / NumberLiteral / BooleanLiteral / type.

🔥 Severity

Severity: Critical (CVSS 9.8/10). Successful exploitation can lead to full system takeover.

🔧 How to fix

Update to 4.7.10.

🛡️ Workaround

Until the patch is applied: disable the affected feature, apply WAF rules, or restrict access via network ACLs.

🔍 Detection

Search webserver/proxy logs for unusual request patterns matching this CVE's known IOCs. Run grep -r 'handlebars' . against your dependency files (package-lock.json, requirements.txt, go.sum) to find affected services.

Response actions

Concrete steps and command examples for SOC/SRE teams to execute in order

  1. 1
    Identify exposure identify
    grep -r 'handlebars' . | grep -v node_modules

    リポジトリと本番環境の依存ファイル (package-lock.json / requirements.txt / go.sum / Gemfile.lock 等) で handlebars を grep し、稼働しているサービス・バージョンを把握する。

  2. 2
    Apply patch patch
    Upgrade handlebars to 4.7.10

    ステージング環境で 4.7.10 に上げて回帰テスト → 本番反映。回帰テストはアプリの主要ハッピーパスを含めること。

  3. 3
    Post-deployment verification verify
    Confirm patched version is live in production

    パッチ適用後、ステージングで PoC または同等の悪用パターンを再現して脆弱性が閉じたことを確認。本番ではアクセスログ・WAF でアラート再発が無いか継続監視。

Affected packages

npm handlebars
[{"type":"ECOSYSTEM","events":[{"introduced":"0"},{"fixed":"4.7.10"}]}]

References

We use cookies for analytics and ad measurement. This setting applies to all Game co., Ltd. sites. Details