Search covers the description text, product and vendor names and weakness types (also partial words).

CVE-2026-33941
handlebarsjs handlebars

Score8.2 High
CVSS 3.1
Exploit probability (EPSS)0.26%
within the next 30 days
CategoryCode execution & injection
Published27 March 2026
Last modified: 26 October 2026

In short

This vulnerability can be exploited with local access to the device, with a regular user account, if a user clicks a link, opens a file or similar.

A successful attack has high impact: reading confidential data, modifying data, crashing the system or making it unavailable.

The impact can spread beyond the vulnerable component.

Weakness type: Cross-site scripting (XSS).

✨ AI commentary

After a short ad, a plain-language commentary on this vulnerability is shown. AI can make mistakes; base decisions on the official sources.

Official 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.

CVSS: CVSS:3.1/AV:L/AC:L/PR:L/UI:R/S:C/C:H/I:H/A:H

Weakness: CWE-79 – Cross-site scripting (XSS), CWE-94 – Code injection, CWE-116

Affected products

VendorProductVersions
handlebarsjshandlebars>=4.0.0 <4.7.9

Sources

Latest in the same category

  • CVE-2026-139860 Medium 5.5
    A vulnerability was found in itsourcecode Stock Management System 1.0. This impacts an unknown function of the file php_action/fetchOrderData.php. Performing a manipulation of the argument orderId results in sql…
    Code execution & injection · 30 November 2026
  • CVE-2026-139859 Medium 5.5
    A vulnerability has been found in itsourcecode Stock Management System 1.0. This affects an unknown function of the file php_action/fetchSelectedProduct.php. Such manipulation of the argument productId leads to sql…
    Code execution & injection · 30 November 2026
  • CVE-2026-139858 Low 2.1
    A flaw has been found in Dromara Jpom up to 2.11.14. The impacted element is the function toIndex of the file IndexControl.java of the component Server Index Controller. This manipulation causes cross site scripting.…
    Code execution & injection · 30 November 2026
  • CVE-2026-139857 Low 2.1
    A vulnerability was detected in Dromara Jpom up to 2.11.14. The affected element is the function toIndex of the file modules/server/src/main/java/org/dromara/jpom/controller/IndexControl.java of the component Web…
    Code execution & injection · 30 November 2026
  • CVE-2026-139856 Medium 5.5
    A security vulnerability has been detected in Dromara Jpom up to 2.11.13. Impacted is the function listPage of the file BaseDbService.java. The manipulation of the argument order_field leads to sql injection. The…
    Code execution & injection · 30 November 2026
  • CVE-2026-137199 Critical 9.2
    cross-spawn is a cross-platform solution for Node.js spawn and spawnSync. Prior to 6.0.7 and 7.1.0, Windows applications that pass untrusted arguments to commands routed through cmd.exe can be vulnerable because…
    Code execution & injection · 30 November 2026