Code Injection in handlebars.js - CVE-2026-33937

 

Code Injection in handlebars.js - CVE-2026-33937

Published: April 2, 2026 / Updated: April 30, 2026


Vulnerability identifier: #VU124842
CSH Severity: High
CVSS v4.0: CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:N/VC:H/VI:H/VA:H/SC:N/SI:N/SA:N/E:P/U:Amber
CVE-ID: CVE-2026-33937
CWE-ID: CWE-94
Exploitation vector: Remote access
Exploit availability: Public exploit is available
Vendor: The Handlebars Templating Language
Affected software:
handlebars.js

Detailed vulnerability description

The vulnerability allows a remote attacker to execute arbitrary code.

The vulnerability exists due to improper control of code generation in Handlebars.compile() and the JavaScript code generator when processing a crafted pre-parsed AST object. A remote attacker can supply a crafted AST with a malicious NumberLiteral value to execute arbitrary code.

The issue affects cases where user-controlled JSON or other untrusted input is deserialized and passed directly to compile() as an AST object instead of a template string, and no user interaction is required.


How to mitigate CVE-2026-33937

Install security update from vendor's website.

Sources