CVE-2026-33938

Handlebars.js has JavaScript Injection via AST Type Confusion by tampering @partial-block

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. Version 4.7.9 fixes the issue. Some workarounds are available. First, use the runtime-only build (`require('handlebars/runtime')`). The `compile()` method is absent, eliminating the vulnerable fallback path. Second, audit registered helpers for any that write arbitrary values to context objects. Helpers should treat context data as read-only. Third, avoid registering helpers from third-party packages (such as `handlebars-helpers`) in contexts where templates or context data can be influenced by untrusted input.


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

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-94 Improper Control of Generation of Code ('Code Injection')



Details

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

Website Distribution by Country

Number of websites using CVE-2026-33938
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-33938
.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-33938

Top websites that are affected by CVE-2026-33938. 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-33938 is Improper Control of Generation of Code ('Code Injection') in Handlebars
A total of 27,902 websites have been identified as vulnerable to CVE-2026-33938, based on global website indexing conducted by WebTechSurvey.
The Handlebars is affected by the CVE-2026-33938 vulnerability.
Handlebars versions up to 4.7.9 are vulnerable to CVE-2026-33938.
CVE-2026-33938 is resolved in version 4.7.9 of Handlebars.