Handlebars-lang handlebars.js
Handlebars: JavaScript Injection via AST Type Confusion in compile (Program.blockParams)
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.
Affected versions and mitigation
From the CVE record and the vendor's references.Affected
- >= 4.0.0, < 4.7.10
Fixed in 4.7.10
Mitigation
Upgrade handlebars.js to 4.7.10 or later.
References
- Vendor advisory github.com/handlebars-lang/handlebars.js/secur…
- Patch github.com/handlebars-lang/handlebars.js/pull/…
- Patch github.com/handlebars-lang/handlebars.js/commi…
1 more
- Release notes github.com/handlebars-lang/handlebars.js/relea…
Timeline
Days relative to CVE publicationFirst public PoC 4.9 days after publication; not in CISA KEV. First PoC: shift-left-test-org2/auto-pr-demo (created 11 Oct 2026, found by us: backfilled).
PoC repositories
Found on GitHub.1 PoCs
PoCs 1
| Repository | Created | Stars | Assessment |
|---|---|---|---|
| shift-left-test-org2/auto-pr-demo | 11 Oct 2026 +4.9 d | 0 | PoC |
Only PoCs count toward the first-PoC date and the characteristics below. Do not run PoC code from unknown sources.
PoC characteristics
What to hunt for in your logs · from 1 PoC repoPOST /render
- Content-Type
application/json- Ports
- 3000
- Seen in
- 1 repo: shift-left-test-org2/auto-pr-demo
- Evidence
- shift-left-test-org2/auto-pr-demo/README.md:59
Regex
Generated from PoC characteristics; not yet reviewed. Matches the request path and query.
(?i)^/render(?:[?#].*)?$
Suricata
Template generated from PoC characteristics. Review before deploying.
alert http any any -> $HOME_NET [3000] (msg:"GG PoC-Monitor CVE-2026-106446 handlebars-lang handlebars.js exploit attempt"; flow:established,to_server; http.method; content:"POST"; http.uri; content:"/render"; reference:url,poc.griffinguard.io/cve/CVE-2026-106446; classtype:web-application-attack; sid:9346213; rev:1;)
Sigma
Template generated from PoC characteristics. Review before deploying.
title: handlebars-lang handlebars.js exploit attempt (CVE-2026-106446)
id: gg-pocmon-cve-2026-106446-9346213
status: experimental
description: Request pattern taken from public PoCs for CVE-2026-106446. Generated, not reviewed.
references:
- https://poc.griffinguard.io/cve/CVE-2026-106446
logsource:
category: webserver
detection:
selection:
cs-method: POST
cs-uri-stem|contains|all:
- '/render'
condition: selection
falsepositives:
- Authorized vulnerability scanning
level: critical
tags:
- attack.initial_access
- attack.t1190
- cve.2026.106446