Code Injection Risk in Handlebars CLI Precompiler for Node.js
CVE-2026-33941

8.3HIGH

Key Information:

Vendor
CVE Published:
27 March 2026

What is CVE-2026-33941?

The Handlebars CLI precompiler prior to version 4.7.9 is vulnerable due to improper handling of user-input strings, such as template filenames and CLI arguments. An attacker can exploit this vulnerability by injecting malicious JavaScript into the generated output, which may execute within Node.js or browser environments. To mitigate this risk, it is essential to validate CLI inputs, utilize a trusted namespace, deploy a sandboxed precompiler environment, and conduct audits of template files in automated build setups.

Affected Version(s)

handlebars.js >= 4.0.0, < 4.7.9

References

CVSS V3.1

Score:
8.3
Severity:
HIGH
Confidentiality:
High
Integrity:
High
Availability:
High
Attack Vector:
Local
Attack Complexity:
Low
Privileges Required:
Low
User Interaction:
Required
Scope:
Changed

Timeline

  • Vulnerability published

  • Vulnerability Reserved

.