CVE-2026-33940 — Code Injection in Handlebars
Severity
8.1HIGHNVD
EPSS
0.1%
top 81.89%
CISA KEV
Not in KEV
Exploit
No known exploits
Affected products
Timeline
PublishedMar 27
Latest updateMar 28
Description
Handlebars provides the power necessary to let users build semantic templates. In versions 4.0.0 through 4.7.8, a crafted object placed in the template context can bypass all conditional guards in `resolvePartial()` and cause `invokePartial()` to return `undefined`. The Handlebars runtime then treats the unresolved partial as a source that needs to be compiled, passing the crafted object to `env.compile()`. Because the object is a valid Handlebars AST containing injected code, the generated Java…
CVSS vector
CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:H/I:H/A:HExploitability: 2.2 | Impact: 5.9
Affected Packages3 packages
Patches
🔴Vulnerability Details
4OSV▶
Handlebars.js has JavaScript Injection via AST Type Confusion when passing an object as dynamic partial↗2026-03-27
GHSA▶
Handlebars.js has JavaScript Injection via AST Type Confusion when passing an object as dynamic partial↗2026-03-27
CVEList▶
Handlebars.js has JavaScript Injection via AST Type Confusion when passing an object as dynamic partial↗2026-03-27
OSV▶
CVE-2026-33940: Handlebars provides the power necessary to let users build semantic templates↗2026-03-27