CVE Catalog

CVE-2026-106446

CriticalCVSS 9.8
Published: Translated: NVD NIST

Summary

Handlebars from 4.0.0 to 4.7.10 accepts pre-parsed AST objects in compile() and precompile() while validating only selected values. An attacker who can supply an object instead of a template string can place JavaScript expressions in unchecked values, leading to code execution on the server. Applications that pass only template strings are not affected. Fixed in 4.7.10.

Risk Assessment

Risk of remote code execution on the server if the application processes untrusted AST objects, potentially leading to full server compromise.

Recommendation

Update Handlebars to version 4.7.10 or later and ensure applications only pass template strings.

Other vulnerabilities in Handlebars

See all
Original NVD description (English source)

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.

Vulnerability data from NVD (NIST) · CISA KEV · EPSS