{"id":"CVE-2026-106446","published":"2026-10-06T19:41:55Z","modified":"2026-10-07T18:30:12Z","title":"Handlebars: JavaScript Injection via AST Type Confusion in compile (Program.blockParams)","vendor":"handlebars-lang","product":"handlebars.js","tier":"tail","description":{"text":"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.","provenance":"source","from":"CVE.org"},"cvss":{"score":9.8,"severity":"CRITICAL","version":"3.1","vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H","provenance":"source","from":"CVE.org CNA"},"epss":{"score":0.00909,"percentile":0.58016,"provenance":"source"},"cwes":[{"id":"CWE-94","name":"Improper Control of Generation of Code"},{"id":"CWE-843","name":"Access of Resource Using Incompatible Type"}],"references":[{"url":"https://github.com/handlebars-lang/handlebars.js/security/advisories/GHSA-8r5x-fm3f-whwj","tags":["x_refsource_CONFIRM"]},{"url":"https://github.com/handlebars-lang/handlebars.js/pull/2185","tags":["x_refsource_MISC"]},{"url":"https://github.com/handlebars-lang/handlebars.js/commit/703fdcc5fd6cc8d1cc0c33cc19de40c467c4b8d2","tags":["x_refsource_MISC"]},{"url":"https://github.com/handlebars-lang/handlebars.js/releases/tag/v4.7.10","tags":["x_refsource_MISC"]}],"priority":{"score":18.5,"factors":[{"name":"EPSS percentile","points":11.6},{"name":"CVSS severity","points":6.86}]},"vendorSlug":"handlebars-lang","affectedVersions":[{"vendor":"handlebars-lang","product":"handlebars.js","versions":[">= 4.0.0, < 4.7.10"]}],"ssvc":{"exploitation":"poc","automatable":"yes","technicalImpact":"total","timestamp":"2026-10-07T18:27:28.577129Z","from":"CISA ADP","provenance":"source"},"affected":[{"ecosystem":"npm","package":"handlebars","vulnerableRanges":[">=4.0.0, <4.7.10"],"patched":["4.7.10"],"from":["GHSA-8r5x-fm3f-whwj"],"provenance":"source"}],"summary":{"text":"Handlebars.js (vendor handlebars-lang) versions from 4.0.0 until 4.7.10 has a code injection flaw in the compile and precompile functions, which accept pre-parsed AST objects and validate only some of their values, so unchecked fields are emitted into generated JavaScript. An attacker who can supply an AST object instead of a template string, with no authentication or user interaction needed over the network, can get code executed in the server process when the compiled output renders or the precompiled output is loaded; applications that only pass template strings are not affected.","provenance":"ai","model":"claude-haiku-5-5","generatedAt":"2026-10-29T07:23:12Z"},"euvd":{"id":"EUVD-2026-93969","exploited":false,"provenance":"source"}}