CVE-2025-68668

CRITICAL
Published December 26, 2025
CISO Take

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.

Affected Systems

Package Ecosystem Vulnerable Range Patched
n8n npm No patch

Do you use n8n? You're affected.

Severity & Risk

CVSS 3.1
9.9 / 10
EPSS
N/A
KEV Status
Not in KEV
Sophistication
Moderate

Recommended Action

  1. 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.

Classification

Compliance Impact

This CVE is relevant to:

EU AI Act
Art. 9 - Risk Management System Article 15 - Accuracy, Robustness and Cybersecurity
ISO 42001
A.6.2.6 - AI System Security A.8.4 - Testing of AI Systems A.9.3 - AI System Security
NIST AI RMF
GOVERN 1.4 - Organizational teams are committed to a culture that considers and communicates AI risk GOVERN 1.7 - Processes and Procedures for AI Risk Management MANAGE 2.2 - Mechanisms are in place to inventory AI risks and to manage risk response
OWASP LLM Top 10
LLM07 - Insecure Plugin Design LLM08 - Excessive Agency

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

Timeline

Published
December 26, 2025
Last Modified
January 5, 2026
First Seen
December 26, 2025