CVE-2026-33941

Handlebars.js has JavaScript Injection in CLI Precompiler via Unescaped Names and Options

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.


We have discovered 27,902 live websites that are affected by CVE-2026-33941.

Run a Free Instant Scan




Affected Software

Product  Handlebars
Category JavaScript Frameworks
Vulnerable Domains27,902 live websites (90% of Handlebars install base)
Vulnerable Versions
  • from 4 through 4.7.9
Vulnerable Versions Count34 versions ( 68% of all versions)


Common Weakness Enumeration

CWE-79 Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting')



Details

  • Published - Mar 27, 2026
  • Updated - Apr 1, 2026

Website Distribution by Country

Number of websites using CVE-2026-33941
United States19,799 websites



Germany857 websites
Canada832 websites
GB674 websites
Australia523 websites
Vietnam391 websites
Poland344 websites
Italy342 websites
Netherlands337 websites
France300 websites

Website Distribution by TLD

Number of websites using CVE-2026-33941
.com16,791 websites
.org2,218 websites
.ca727 websites
.net673 websites
.de575 websites
.co.uk467 websites
.com.au452 websites
.edu421 websites
.pl310 websites
.it269 websites

Vulnerable Versions

Vulnerable versions are highlighted in red

Websites affected by CVE-2026-33941

Top websites that are affected by CVE-2026-33941. Please click on the "Contact us" link to get more information.
DomainCountryRankContacts
***.***.*******.com United States*,***
************.**.uk GB*,***
*************.com United States*,***
*****.blog Singapore*,***
******.edu Australia*,***
*************.com United States*,***
*****.com United States**,***
****.com United States**,***
**********.**.uk United States**,***
******.com United States**,***
See full domain list

FAQ

CVE-2026-33941 is Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting') in Handlebars
A total of 27,902 websites have been identified as vulnerable to CVE-2026-33941, based on global website indexing conducted by WebTechSurvey.
The Handlebars is affected by the CVE-2026-33941 vulnerability.
Handlebars versions up to 4.7.9 are vulnerable to CVE-2026-33941.
CVE-2026-33941 is resolved in version 4.7.9 of Handlebars.