CVE-2025-68668: n8n: Protection Bypass circumvents security controls
CRITICAL PoC AVAILABLEIf your organization runs n8n for AI workflow automation, this is a drop-everything-and-patch situation. Any authenticated user with workflow edit access can execute arbitrary OS commands on your n8n host — full server compromise via a single malicious Python Code Node. Patch to 2.0.0 immediately; if you cannot, set N8N_PYTHON_ENABLED=false as an interim workaround and audit who holds workflow modification permissions.
Risk Assessment
Critical risk. CVSS 9.9 reflects network-accessible, low-complexity, low-privilege exploitation with full C/I/A impact across scope boundaries. n8n is increasingly deployed as the orchestration backbone for AI agent pipelines, meaning a compromised n8n host cascades to all connected LLM APIs, databases, and downstream SaaS integrations. The low privilege requirement makes this broadly exploitable — any standard user account suffices, not just admins. No active KEV listing yet, but the low barrier to exploitation makes weaponization highly probable.
Affected Systems
| Package | Ecosystem | Vulnerable Range | Patched |
|---|---|---|---|
| n8n | npm | — | No patch |
Do you use n8n? You're affected.
Severity & Risk
Attack Surface
Recommended Action
7 steps-
IMMEDIATE
Upgrade to n8n 2.0.0.
-
If immediate patching is blocked: set environment variable N8N_PYTHON_ENABLED=false (available since 1.104.0) — disables Python while preserving JavaScript Code Nodes.
-
If full Code Node must be disabled: set NODES_EXCLUDE=["n8n-nodes-base.code"].
-
Longer term: enable the task-runner-based Python sandbox via N8N_RUNNERS_ENABLED=true and N8N_NATIVE_PYTHON_RUNNER=true env vars (architectural isolation rather than process-level sandbox).
-
Apply least-privilege on workflow permissions — audit who can create or modify workflows and remove unnecessary access.
-
Search audit logs for Code Node executions containing subprocess, os.system, exec, eval, or network calls outside expected patterns.
-
If compromise is suspected: rotate all API keys and credentials stored in n8n connections immediately.
CISA SSVC Assessment
Source: CISA Vulnrichment (SSVC v2.0). Decision based on the CISA Coordinator decision tree.
Classification
Compliance Impact
This CVE is relevant to:
Frequently Asked Questions
What is CVE-2025-68668?
If your organization runs n8n for AI workflow automation, this is a drop-everything-and-patch situation. Any authenticated user with workflow edit access can execute arbitrary OS commands on your n8n host — full server compromise via a single malicious Python Code Node. Patch to 2.0.0 immediately; if you cannot, set N8N_PYTHON_ENABLED=false as an interim workaround and audit who holds workflow modification permissions.
Is CVE-2025-68668 actively exploited?
Proof-of-concept exploit code is publicly available for CVE-2025-68668, increasing the risk of exploitation.
How to fix CVE-2025-68668?
1. IMMEDIATE: Upgrade to n8n 2.0.0. 2. If immediate patching is blocked: set environment variable N8N_PYTHON_ENABLED=false (available since 1.104.0) — disables Python while preserving JavaScript Code Nodes. 3. If full Code Node must be disabled: set NODES_EXCLUDE=["n8n-nodes-base.code"]. 4. Longer term: enable the task-runner-based Python sandbox via N8N_RUNNERS_ENABLED=true and N8N_NATIVE_PYTHON_RUNNER=true env vars (architectural isolation rather than process-level sandbox). 5. Apply least-privilege on workflow permissions — audit who can create or modify workflows and remove unnecessary access. 6. Search audit logs for Code Node executions containing subprocess, os.system, exec, eval, or network calls outside expected patterns. 7. If compromise is suspected: rotate all API keys and credentials stored in n8n connections immediately.
What systems are affected by CVE-2025-68668?
This vulnerability affects the following AI/ML architecture patterns: agent frameworks, AI workflow automation pipelines, LLM integration pipelines, no-code/low-code AI builders, multi-tool AI orchestration platforms.
What is the CVSS score for CVE-2025-68668?
CVE-2025-68668 has a CVSS v3.1 base score of 9.9 (CRITICAL). The EPSS exploitation probability is 0.06%.
Technical Details
NVD Description
n8n is an open source workflow automation platform. From version 1.0.0 to before 2.0.0, a sandbox bypass vulnerability exists in the Python Code Node that uses Pyodide. An authenticated user with permission to create or modify workflows can exploit this vulnerability to execute arbitrary commands on the host system running n8n, using the same privileges as the n8n process. This issue has been patched in version 2.0.0. Workarounds for this issue involve disabling the Code Node by setting the environment variable NODES_EXCLUDE: "[\"n8n-nodes-base.code\"]", disabling Python support in the Code node by setting the environment variable N8N_PYTHON_ENABLED=false, which was introduced in n8n version 1.104.0, and configuring n8n to use the task runner based Python sandbox via the N8N_RUNNERS_ENABLED and N8N_NATIVE_PYTHON_RUNNER environment variables.
Exploitation Scenario
An attacker with a valid n8n user account — obtained via phishing, credential stuffing, or insider access — creates or modifies an existing workflow containing a Python Code Node. They craft Python code that exploits the Pyodide sandbox's protection mechanism failure (CWE-693) to break out of the WebAssembly-based isolation layer. Once escaped, arbitrary OS commands execute with the same privileges as the n8n process, which in typical deployments runs with broad or root-level access. The attacker reads environment variables to harvest LLM API keys, database credentials, and webhook secrets; establishes a reverse shell for persistent access; and pivots laterally to connected AI services and internal infrastructure. The entire attack requires no elevated n8n permissions and no user interaction beyond the attacker's own session.
Weaknesses (CWE)
CVSS Vector
CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:C/C:H/I:H/A:H References
Timeline
Related Vulnerabilities
CVE-2026-33663 10.0 n8n: member role steals plaintext HTTP credentials
Same package: n8n CVE-2026-33660 10.0 TensorFlow: type confusion NPD in tensor conversion
Same package: n8n CVE-2026-21858 10.0 n8n: Input Validation flaw enables exploitation
Same package: n8n CVE-2026-27577 9.9 n8n: Code Injection enables RCE
Same package: n8n CVE-2026-27494 9.9 n8n: security flaw enables exploitation
Same package: n8n
AI Threat Alert