CVE-2026-33941
Handlebars.js has JavaScript Injection in CLI Precompiler via Unescaped Names and Options
CVE-2026-33941 is an XSS in Handlebars-lang Handlebars.js (CVSS 8.2, High).
No known exploitation. EPSS puts it in the 11th percentile. Fixed in 4.7.9.
No public exploit knownFix4.7.9Upgrade to this build
e.g. OID 1.3.6.1.4.1.25623.1.1.9.2026.21021011008100100674
What to do
Find your product and version, then upgrade to the build on the right.
- Handlebars-lang Handlebars.jsAffected: >= 4.0.0, < 4.7.9Upgrade to: not statedStated by: CVE record
- Handlebarsjs HandlebarsAffected: ≥ 4.0.0, < 4.7.9Upgrade to: 4.7.9Stated by: NVD
Versions as the sources state them. Full version matrix after sign-in
What it is
From the CVE record
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 Node.js or a browser. Version 4.7.9 fixes the issue. Some workarounds are available. First, validate all CLI inputs before invoking the precompiler. Reject filenames and option values that contain characters with JavaScript string-escaping significance (`"`, `'`, `;`, etc.). Second, use a fixed, trusted namespace string passed via a configuration file rather than command-line arguments in automated pipelines. Third, run the precompiler in a sandboxed environment (container with no write access to sensitive paths) to limit the impact of successful exploitation. Fourth, audit template filenames in any repository or package that is consumed by an automated build pipeline.
In plain language
No plain-language summary for this CVE yet.
Exploitation
Where each signal puts this CVE on the scale from published to confirmed exploited.
- CISA KEV
Not in the catalog. CISA has not confirmed exploitation.
- Public exploits
No public exploit or proof of concept found in the sources we track.
- EPSS
0.3% chance of exploitation activity in the next 30 days, which ranks it in the 11th percentile of scored CVEs.
Exploit Prediction Scoring System, FIRST.org. A probability, not a confirmation.
Lifecycle
14 events over 213 days, from the signal feeds we watch.
- Patch availablerecord updated
- Patch availablerecord updated
- Patch availablerecord updated
- Patch availablerecord updated
- Patch availablerecord updated
- OpenVAS check added
Affected products
Technical detail
CVSS 3.1 vector
Open in the CVSS calculatorCVSS:3.1/AV:L/AC:L/PR:L/UI:R/S:C/C:H/I:H/A:H
Scored 8.2 by NVD.
How it is reached
- Attack Vector LocalRequires local access to the vulnerable system (e.g. local login, malicious file)
- Attack Complexity LowNo special conditions — the attack can be reliably reproduced
- Privileges Required LowRequires basic user-level privileges
- User Interaction RequiredA user must click a link, open a file, or perform some action
Scope
- Scope ChangedThe exploit can affect other components (e.g. sandbox escape, host compromise from VM)
Impact if exploited
- Confidentiality HighTotal information disclosure — all data in the component is compromised
- Integrity HighTotal loss of integrity — attacker can modify any data in the component
- Availability HighTotal denial of service — the component is completely unavailable
Weaknesses
ATT&CK techniques
Mapped from the weaknesses above (CWE to ATT&CK), not observed in attacks.
Sources
Questions about CVE-2026-33941
- Is CVE-2026-33941 being exploited?
- No exploitation is confirmed and no public exploit is known. EPSS puts the chance of exploitation in the next 30 days at 0.3%.
- Which versions are affected by CVE-2026-33941?
- Handlebars.js: >= 4.0.0, < 4.7.9. Handlebars: ≥ 4.0.0, < 4.7.9.
- How do I fix or mitigate CVE-2026-33941?
- Upgrade to 4.7.9 or later. The advisory is on github.com.
Last updated
Related articles
All articlesWatch the software you run.
My Stack ranks new CVEs for your products by real-world exploitation, so the next serious one reaches you without reading every advisory.
We'll flag the next CVE, public exploit or patch for Handlebars.js, not every advisory.
A free account adds
- The full version matrix and every affected product
- Exploit links, proofs of concept and Metasploit modules
- Email alerts for the products you watch
- The same data over REST API, MCP and CLI