CVE-2026-33938Code Injection in Handlebars

Severity
8.1HIGHNVD
EPSS
0.1%
top 75.17%
CISA KEV
Not in KEV
Exploit
No known exploits
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, the `@partial-block` special variable is stored in the template data context and is reachable and mutable from within a template via helpers that accept arbitrary objects. When a helper overwrites `@partial-block` with a crafted Handlebars AST, a subsequent invocation of `{{> @partial-block}}` compiles and executes that AST, enabling arbitrary JavaScript execution on the server. Versio

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

NVDhandlebarsjs/handlebars4.0.04.7.9
npmhandlebarsjs/handlebars4.0.04.7.9
CVEListV5handlebars-lang/handlebars.js>= 4.0.0, < 4.7.9

Patches

🔴Vulnerability Details

4
GHSA
Handlebars.js has JavaScript Injection via AST Type Confusion by tampering @partial-block2026-03-27
OSV
CVE-2026-33938: Handlebars provides the power necessary to let users build semantic templates2026-03-27
OSV
Handlebars.js has JavaScript Injection via AST Type Confusion by tampering @partial-block2026-03-27
CVEList
Handlebars.js has JavaScript Injection via AST Type Confusion by tampering @partial-block2026-03-27

📋Vendor Advisories

2
Red Hat
handlebars: Handlebars: Arbitrary code execution via @partial-block overwrite2026-03-27
Debian
CVE-2026-33938: node-handlebars - Handlebars provides the power necessary to let users build semantic templates. I...2026

🕵️Threat Intelligence

1
Wiz
CVE-2026-33938 Impact, Exploitability, and Mitigation Steps | Wiz

💬Community

2
Bugzilla
CVE-2026-33938 openbao: Handlebars: Arbitrary code execution via @partial-block overwrite [epel-all]2026-03-28
Bugzilla
CVE-2026-33938 openbao: Handlebars: Arbitrary code execution via @partial-block overwrite [fedora-all]2026-03-28
CVE-2026-33938 — Code Injection in Handlebars | cvebase