Description
Handlebars.compile() and Handlebars.precompile() accept a pre-parsed AST as well as a template string. Handlebars 4.7.9 added validation for such ASTs. It only checks values on PathExpression, NumberLiteral and BooleanLiteral nodes, and the compiler still writes several other AST values into the generated JavaScript unchecked.
Recommendation
Update the handlebars package to the latest compatible version. Followings are version details:
- Affected version(s): >= 4.0.0, <= 4.7.9
- Patched version(s): 4.7.10
References
Could your website be exposed too?
SmartScanner can check your website for Handlebars: JavaScript Injection via AST Type Confusion in compile (bypass of CVE-2026-33937) and gives you actionable findings to investigate.
Start a free scanRelated Issues
- Handlebars.js has JavaScript Injection via AST Type Confusion - CVE-2026-33937
- Handlebars.js has JavaScript Injection via AST Type Confusion when passing an object as dynamic partial - CVE-2026-33940
- Handlebars.js has JavaScript Injection via AST Type Confusion by tampering @partial-block - CVE-2026-33938
- Handlebars: JavaScript Injection via Own Property Check Bypass - CVE-2026-106445


