CVE-2026-33941
Last modified
CVE-2026-33941 is a high-severity vulnerability rated 8.2/10 on the CVSS scale. 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. EPSS estimates a 0.29% chance of exploitation in the next 30 days.
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 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.
Metrics
CVSS:3.1/AV:L/AC:L/PR:L/UI:R/S:C/C:H/I:H/A:H
Weakness Enumeration
Affected Software
| Vendor | Product | Versions |
|---|---|---|
| Handlebarsjs | Handlebars | >= 4.0.0, < 4.7.9 |
References
- https://github.com/handlebars-lang/handlebars.js/security/advisories/GHSA-xjpj-3mr7-gcpfExploit, Vendor Advisory
Timeline
- Published
- Last Modified
- Status
- Modified
Frequently Asked Questions
What is CVE-2026-33941?
How severe is CVE-2026-33941?
How do I fix CVE-2026-33941?
How Strix Helps
- How Strix found a critical auth bypass in etcdStrix autonomously discovered a critical authentication bypass in etcd, later designated CVE-2026-33413.
- Autonomous PentestingAI agents that find and validate exploitable vulnerabilities like this one across your applications.
- PR ReviewsPentest every pull request so vulnerable code is caught before it ships to production.
- AI Penetration TestingHow AI-driven penetration testing continuously covers your attack surface.
Related CVEs from 2026
- CVE-2026-33936The `ecdsa` PyPI package is a pure Python implementation of …5.3
- CVE-2026-33937Handlebars provides the power necessary to let users build s…9.8
- CVE-2026-33938Handlebars provides the power necessary to let users build s…8.1
- CVE-2026-33939Handlebars provides the power necessary to let users build s…7.5
- CVE-2026-3394A vulnerability was detected in jarikomppa soloud up to 2020…7.8
- CVE-2026-33940Handlebars provides the power necessary to let users build s…8.1
- CVE-2026-33942Saloon is a PHP library that gives users tools to build API …9.8
- CVE-2026-33943Happy DOM is a JavaScript implementation of a web browser wi…9.8
- CVE-2026-33945Incus is a system container and virtual machine manager. Inc…9.6
- CVE-2026-33946MCP Ruby SDK is the official Ruby SDK for Model Context Prot…5.9
- CVE-2026-33947jq is a command-line JSON processor. In versions 1.8.1 and b…5.5
- CVE-2026-33948jq is a command-line JSON processor. Commits before 6374ae0b…5.3
Are you affected by CVE-2026-33941?
Run a free Strix scan to check your systems for this vulnerability.
Scan your code nowSource: NVD / NIST
