CVE-2026-27494
CRITICALCVE-2026-27494 is a critical sandbox escape in n8n's Python Code node that allows any authenticated user with workflow edit permissions to achieve RCE on the n8n host — a CVSS 9.9 is warranted. Patch immediately to 2.10.1 / 2.9.3 / 1.123.22; if you cannot patch today, restrict workflow editing to fully trusted users and disable the Code node via NODES_EXCLUDE. In AI/ML environments, n8n is commonly used as the orchestration backbone connecting LLMs, vector databases, and external APIs — a compromised n8n host exposes every secret and credential in that pipeline.
Affected Systems
| Package | Ecosystem | Vulnerable Range | Patched |
|---|---|---|---|
| n8n | npm | — | No patch |
| n8n | npm | — | No patch |
| n8n | npm | — | No patch |
| n8n | npm | — | No patch |
| n8n | npm | — | No patch |
| n8n | npm | — | No patch |
| n8n | npm | — | No patch |
Severity & Risk
Recommended Action
- 1. PATCH: Upgrade n8n to 2.10.1 (v2 branch), 2.9.3 (v2 LTS), or 1.123.22 (v1 LTS) immediately. 2. RESTRICT (if patching is delayed): Audit and revoke workflow creation/edit permissions for all non-essential users; apply least privilege. 3. DISABLE CODE NODE: Set NODES_EXCLUDE=n8n-nodes-base.code in your environment to eliminate the attack surface entirely until patched. 4. ROTATE CREDENTIALS: Assume any n8n instance exposed to non-admin authenticated users may have been compromised; rotate all API keys, tokens, and secrets stored in n8n environment variables or workflow configurations. 5. DETECT: Search logs for unusual outbound connections from the n8n process, unexpected file reads outside the n8n working directory, or execution of system-level commands (os.system, subprocess, __import__). 6. AUDIT: Review who has had workflow edit access in the past 90 days.
Classification
Compliance Impact
This CVE is relevant to:
Technical Details
NVD Description
n8n is an open source workflow automation platform. Prior to versions 2.10.1, 2.9.3, and 1.123.22, an authenticated user with permission to create or modify workflows could use the Python Code node to escape the sandbox. The sandbox did not sufficiently restrict access to certain built-in Python objects, allowing an attacker to exfiltrate file contents or achieve RCE. On instances using internal Task Runners (default runner mode), this could result in full compromise of the n8n host. On instances using external Task Runners, the attacker might gain access to or impact other task executed on the Task Runner. Task Runners must be enabled using `N8N_RUNNERS_ENABLED=true`. The issue has been fixed in n8n versions 2.10.1, 2.9.3, and 1.123.22. Users should upgrade to this version or later to remediate the vulnerability. If upgrading is not immediately possible, administrators should consider the following temporary mitigations. Limit workflow creation and editing permissions to fully trusted users only., and/or disable the Code node by adding `n8n-nodes-base.code` to the `NODES_EXCLUDE` environment variable. These workarounds do not fully remediate the risk and should only be used as short-term mitigation measures.
Exploitation Scenario
An attacker with a low-privilege n8n account (e.g., a contractor, compromised SaaS user, or insider) creates a new workflow containing a Python Code node. They craft Python leveraging unrestricted access to built-in objects — using introspection chains like `''.__class__.__mro__[1].__subclasses__()` to locate `subprocess.Popen` or `os.system` outside the sandbox boundary. On the default internal Task Runner configuration, this executes directly on the n8n host. The attacker reads `/proc/1/environ` and local `.env` files to harvest OpenAI API keys, vector database credentials, and cloud provider tokens. With RCE, they install a reverse shell, establish persistence via a cron job, and pivot to connected AI services — accessing the organization's RAG corpus, model fine-tuning datasets, and LLM inference infrastructure. The entire AI stack is now under adversary control.
Weaknesses (CWE)
CVSS Vector
CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:C/C:H/I:H/A:H References
- github.com/n8n-io/n8n/releases/tag/n8n@1.123.22 Product
- github.com/n8n-io/n8n/releases/tag/n8n@1.123.22 Product
- github.com/n8n-io/n8n/releases/tag/n8n@1.123.22 Product
- github.com/n8n-io/n8n/releases/tag/n8n@2.10.1 Product
- github.com/n8n-io/n8n/releases/tag/n8n@2.10.1 Product
- github.com/n8n-io/n8n/releases/tag/n8n@2.10.1 Product
- github.com/n8n-io/n8n/releases/tag/n8n@2.9.3 Product
- github.com/n8n-io/n8n/releases/tag/n8n@2.9.3 Product
- github.com/n8n-io/n8n/releases/tag/n8n@2.9.3 Product
- github.com/n8n-io/n8n/security/advisories/GHSA-mmgg-m5j7-f83h Vendor Mitigation
- github.com/n8n-io/n8n/security/advisories/GHSA-mmgg-m5j7-f83h Vendor Mitigation
- github.com/n8n-io/n8n/security/advisories/GHSA-mmgg-m5j7-f83h Vendor Mitigation