Impact
A vulnerable version of the templating library allows engineered changes to a special context variable to inject a Handlebars Abstract Syntax Tree that is then compiled. This results in execution of arbitrary JavaScript code on the server, compromising confidentiality, integrity, and availability of the affected application. The weakness is categorized under CWE‑843, CWE‑917, and CWE‑94.
Affected Systems
All Node.js applications using Handlebars.js between versions 4.0.0 and 4.7.8, inclusive, are affected. The issue is resolved in 4.7.9 and later. Applications that embed third‑party helpers or allow untrusted data to influence template helpers are at greater risk.
Risk and Exploitability
The reported CVSS score is 8.1, indicating high severity. EPSS indicates less than 1% chance of exploitation in the wild, and the vulnerability is not listed in the CISA KEV catalog. The likely attack vector requires the attacker to control template helper input or to supply malicious data to a helper that writes to the context; thus, environments that expose helper internals to untrusted data are the most susceptible.
OpenCVE Enrichment
Github GHSA