JavaScript injection in Handlebars compile via crafted AST objects
Key facts
- Attack vector
- Network
- Privileges required
- None
- User interaction
- None
- Attack complexity
- Low
- Impact type
- Code execution
- Confidentiality · integrity · availability
- High · High · High
- Fix status
- Partial Red Hat: 4 fixed, 8 without a fix
Attack profile from CVSS 3.1 · CNA. Fix status from CNA, GitHub and Red Hat. Impact type from CWE-843 and the CVSS impact.
Summary
handlebars.js and the npm handlebars package from 4.0.0 before 4.7.10 are affected. Handlebars.compile() and Handlebars.precompile() accept pre-parsed AST objects but validate only some values, so unchecked values such as Program.blockParams.length reach generated JavaScript (CWE-94). An attacker who can supply an object instead of a template string can execute code in the server process.
Written with Claude Haiku 5.5 from the sources below · 2026-11-06
Description from the CNA
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.
Why it matters now
SSVC decision points
CISA ADP · SSVC 2.0.3
- Exploitation
- Poc
- Automatable
- Yes
- Technical impact
- Total
The decision (Track, Attend, Act) also depends on your mission and well-being impact; see CISA's SSVC guide.
Affected products
| Vendor | Product | Affected versions | Fixed in | Status | Source |
|---|---|---|---|---|---|
| handlebars-lang | handlebars.js | 4.0.0 to before 4.7.10 | 4.7.10 | Patch available | CNA |
| — | handlebars (npm) | 4.0.0 to before 4.7.10 | 4.7.10 | Patch available | GHSA-8r5x-fm3f-whwj |
- handlebars.js Vendorhandlebars-lang Affected 4.0.0 to before 4.7.10 Fixed in 4.7.10 Patch available CNA
- handlebars (npm) Vendor— Affected 4.0.0 to before 4.7.10 Fixed in 4.7.10 Patch available GHSA-8r5x-fm3f-whwj
CPE names Threatist (inferred) · 1
Inferred from how NVD named this product before; not given by a source.
| CPE | Versions | Role | Vendor |
|---|---|---|---|
| cpe:2.3:a:handlebarsjs:handlebars:*:*:*:*:*:*:*:* | — | — | handlebars-lang |
- cpe:2.3:a:handlebarsjs:handlebars:*:*:*:*:*:*:*:* Versions — — ·handlebars-lang
Remediation
Upgrade handlebars.js and the npm handlebars package to 4.7.10. Fixed Red Hat products: Cryostat 4 (RHSA-2026:95360), Red Hat OpenShift AI 3.4 (RHSA-2026:92510), Advanced Cluster Management for Kubernetes 2.13 (RHSA-2026:92307) and multicluster engine for Kubernetes 2.8 (RHSA-2026:92303). The sources list no fixed version for Node HealthCheck Operator, Red Hat AMQ Broker 7, Red Hat Enterprise Linux 8, Red Hat OpenShift Dev Spaces, Red Hat Quay 3, Red Hat build of Apache Camel - HawtIO 4 and Self-service automation portal 2.
Written with Claude Haiku 5.5 from the sources below · 2026-11-06
- Fix · CNA handlebars.js (handlebars-lang) Fixed in 4.7.10
- Fix · GHSA-8r5x-fm3f-whwj handlebars (npm) Fixed in 4.7.10 Advisory →
Red Hat 4 advisories
- RHSA-2026:95360 Released 2026-11-04 · Red Hat rating ImportantRed Hat build of Cryostat security update
- Cryostat 4 on RHEL 9 cryostat/cryostat-grafana-dashboard-rhel9, cryostat/cryostat-openshift-console-plugin-rhel9, cryostat/cryostat-storage-rhel9
- RHSA-2026:92510 Released 2026-10-29 · Red Hat rating CriticalRHOAI 3.4.6 - Red Hat OpenShift AI
- Red Hat OpenShift AI 3.4 registry.redhat.io/rhoai/odh-built-in-detector-rhel9, registry.redhat.io/rhoai/odh-cli-rhel9, registry.redhat.io/rhoai/odh-dashboard-rhel9 +47
- RHSA-2026:92307 Released 2026-10-29 · Red Hat rating ImportantRed Hat Advanced Cluster Management for Kubernetes v2.13.14 security update
- Red Hat Advanced Cluster Management for Kubernetes 2.13 registry.redhat.io/rhacm2/acm-grafana-rhel9, registry.redhat.io/rhacm2/acm-multicluster-observability-addon-rhel9, registry.redhat.io/rhacm2/acm-prometheus-config-reloader-rhel9 +16
Show 1 more Red Hat advisories
- RHSA-2026:92303 Released 2026-10-29 · Red Hat rating Importantmulticluster engine for Kubernetes v2.8.12 security update
- multicluster engine for Kubernetes 2.8 registry.redhat.io/multicluster-engine/addon-manager-rhel9, registry.redhat.io/multicluster-engine/backplane-rhel9-operator, registry.redhat.io/multicluster-engine/cluster-curator-controller-rhel9 +12
Vendor assessments
Red Hat
Red Hat rating: Important. Red Hat's page for this CVE →
| Product | Status | Plan or fix |
|---|---|---|
| Node HealthCheck Operator | Affected | No fix yet |
| Red Hat AMQ Broker 7 | Affected | No fix yet |
| Red Hat Enterprise Linux 8 | Affected | No fix yet |
| Red Hat OpenShift AI (RHOAI) | Affected | No fix yet |
| Red Hat OpenShift Dev Spaces | Affected | No fix yet |
| Red Hat Quay 3 | Affected | No fix yet |
| Red Hat build of Apache Camel - HawtIO 4 | Affected | No fix yet |
| Self-service automation portal 2 | Affected | No fix yet |
| Cryostat 4 on RHEL 9 | Fixed | RHSA-2026:95360 |
| Red Hat Advanced Cluster Management for Kubernetes 2.13 | Fixed | RHSA-2026:92307 |
| Red Hat OpenShift AI 3.4 | Fixed | RHSA-2026:92510 |
| multicluster engine for Kubernetes 2.8 | Fixed | RHSA-2026:92303 |
Not affected: 18 products
- Cryostat 4 on RHEL 9
- Red Hat AMQ Broker 7
- Red Hat Advanced Cluster Management for Kubernetes 2.13
- Red Hat Data Grid 8
- Red Hat Developer Hub 1
- Red Hat Enterprise Linux 10
- Red Hat Enterprise Linux 7
- Red Hat Enterprise Linux 8
- Red Hat Enterprise Linux 9
- Red Hat Enterprise Linux AI (RHEL AI) 3
- Red Hat Hardened Images
- Red Hat OpenShift AI (RHOAI)
- Red Hat OpenShift AI 3.4
- Red Hat OpenShift Dev Spaces
- Red Hat OpenShift Update Service
- Red Hat Trusted Profile Analyzer
- Red Hat build of Apache Camel for Spring Boot 4
- multicluster engine for Kubernetes 2.8
Timeline
- 2026-10-06 Threatist record created from CVE-2026-106446
- 2026-10-07 CISA SSVC decision points changed
- 2026-10-07 Priority changed: MEDIUM → HIGH
- 2026-10-08 Alias added: GHSA-8r5x-fm3f-whwj
- 2026-10-08 Fix available: npm/[email protected] · GHSA-8r5x-fm3f-whwj
- 2026-10-08 CVSS score added · GHSA-8r5x-fm3f-whwj
- 2026-10-08 Weakness changed · GHSA-8r5x-fm3f-whwj
- 2026-10-08 6 new references · GHSA-8r5x-fm3f-whwj
- 2026-10-10 Affected versions changed · Red Hat
- 2026-10-10 CVSS score added · Red Hat
- 2026-10-15 Affected versions changed · Red Hat
- 2026-10-16 Affected versions changed · Red Hat
- 2026-10-20 Affected versions changed · Red Hat
- 2026-10-23 EPSS moved to the 50th–90th percentile
- 2026-10-27 Affected versions changed · Red Hat
- 2026-10-30 Fix available: RHSA-2026:92303 · Red Hat
- 2026-10-30 Fix available: RHSA-2026:92307 · Red Hat
- 2026-10-30 Fix available: RHSA-2026:92510 · Red Hat
- 2026-10-30 Fix available: Red Hat Advanced Cluster Management for Kubernetes 2.13, Red Hat OpenShift AI 3.4, multicluster engine for Kubernetes 2.8 · Red Hat
- 2026-11-05 Fix available: Cryostat 4 on RHEL 9 · Red Hat
- 2026-11-06 Fix available: RHSA-2026:95360 · Red Hat
References
Other 5
- https://github.com/handlebars-lang/handlebars.js/security/advisories/GHSA-8r5x-fm3f-whwj
- https://github.com/handlebars-lang/handlebars.js/pull/2185
- https://github.com/handlebars-lang/handlebars.js/commit/703fdcc5fd6cc8d1cc0c33cc19de40c467c4b8d2
- https://github.com/handlebars-lang/handlebars.js/releases/tag/v4.7.10
- https://github.com/handlebars-lang/handlebars.js
More handlebars-lang vulnerabilities
- TI-2026-26288 Handlebars.js has JavaScript Injection via AST Type Confusion CVSS 3.1CRITICAL 9.8
- TI-2026-68925 JavaScript injection in Handlebars via own property check bypass CVSS 4.0CRITICAL 9.2
- TI-2026-26290 Handlebars.js has Denial of Service via Malformed Decorator Syntax in Template Compilation CVSS 3.1HIGH 7.5
- TI-2026-26292 Handlebars.js has JavaScript Injection in CLI Precompiler via Unescaped Names and Options CVSS 3.1HIGH 8.3
- TI-2026-26291 Handlebars.js has JavaScript Injection via AST Type Confusion when passing an object as dynamic partial CVSS 3.1HIGH 8.1
- TI-2026-26289 Handlebars.js has JavaScript Injection via AST Type Confusion by tampering @partial-block CVSS 3.1HIGH 8.1
Sources
- CVE-2026-106446 · CVE Program
- CVE-2026-106446 · NVD
- FIRST EPSS
- GHSA-8r5x-fm3f-whwj · GitHub Advisory Database · CC BY 4.0
- CVE-2026-106446 · Red Hat security data · CC BY 4.0
This product uses the NVD API but is not endorsed or certified by the NVD. Sources and licences