Skip to content
OpenAdvisories
Critical · 9.8 CVE-2026-106446 EUVD-2026-93969GHSA-8r5x-fm3f-whwj

Handlebars: JavaScript Injection via AST Type Confusion in compile (Program.blockParams)

Published Oct 6, 2026 · Updated Oct 7, 2026 · Assigned by GitHub_M

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.

Affected products

VendorProductAffectedFixed
handlebars-lang handlebars.js >= 4.0.0, < 4.7.10 —

Fixed in Linux distributions

Distributions backport fixes, so the version that fixes this vulnerability differs per release — upgrade to at least the version shown. From the distributions' security trackers and advisories.

ReleasePackageFixed inAdvisory
Debian 14 node-handlebars 3:4.7.10-1 —
Debian 13 node-handlebars No fix yet —
Debian 12 node-handlebars No fix yet —
ReleasePackageFixed inAdvisory
Ubuntu 26.10 node-handlebars No fix yet —
Ubuntu 26.04 LTS node-handlebars No fix yet —
Ubuntu 24.04 LTS node-handlebars No fix yet —
Ubuntu 22.04 LTS node-handlebars No fix yet —
Ubuntu 20.04 LTS node-handlebars No fix yet —
Show 2 more (older releases, extended support, other products)
ReleasePackageFixed inAdvisory
Ubuntu 18.04 LTS node-handlebars No fix yet —
Ubuntu 16.04 LTS ruby-handlebars-assets No fix yet —

Wolfi

ReleasePackageFixed inAdvisory
Wolfi rolling lerna 10.0.1-r10 —
Wolfi rolling nextcloud-server-33 33.0.9-r7 —
Wolfi rolling opensearch-dashboards-3 3.8.0-r13 —
Wolfi rolling prism 5.16.0-r16 —
Wolfi rolling rancher-api-ui 1.2.3-r15 —
Wolfi rolling renovate 44.133.0-r5 —
Wolfi rolling tileserver-gl 5.6.0-r20 —
Wolfi rolling ts-patch 4.0.1-r48 —

Affected packages

EcosystemPackageAffectedFixedRecord
npm handlebars >= 4.0.0, < 4.7.10 4.7.10 GHSA-8r5x-fm3f-whwj

Advisories 1

References