CVE-2026-33941Cross-site Scripting in Handlebars

Severity
8.2HIGHNVD
EPSS
0.0%
top 95.11%
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 Handlebars CLI precompiler (`bin/handlebars` / `lib/precompiler.js`) concatenates user-controlled strings — template file names and several CLI options — directly into the JavaScript it emits, without any escaping or sanitization. An attacker who can influence template filenames or CLI arguments can inject arbitrary JavaScript that executes when the generated bundle is loaded in No

CVSS vector

CVSS:3.1/AV:L/AC:L/PR:L/UI:R/S:C/C:H/I:H/A:HExploitability: 1.5 | Impact: 6.0

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 in CLI Precompiler via Unescaped Names and Options2026-03-27
CVEList
Handlebars.js has JavaScript Injection in CLI Precompiler via Unescaped Names and Options2026-03-27
OSV
CVE-2026-33941: Handlebars provides the power necessary to let users build semantic templates2026-03-27
OSV
Handlebars.js has JavaScript Injection in CLI Precompiler via Unescaped Names and Options2026-03-27

📋Vendor Advisories

2
Red Hat
handlebars.js: Handlebars: Arbitrary code execution via CLI precompiler input sanitization flaw2026-03-27
Debian
CVE-2026-33941: node-handlebars - Handlebars provides the power necessary to let users build semantic templates. I...2026

🕵️Threat Intelligence

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

💬Community

2
Bugzilla
CVE-2026-33941 openbao: Handlebars: Arbitrary code execution via CLI precompiler input sanitization flaw [fedora-all]2026-03-28
Bugzilla
CVE-2026-33941 openbao: Handlebars: Arbitrary code execution via CLI precompiler input sanitization flaw [epel-all]2026-03-28
CVE-2026-33941 — Cross-site Scripting in Handlebars | cvebase