Critical n8n flaw CVE-2025-68668 allows authenticated command execution on host

by

A critical vulnerability in the open source workflow platform n8n could allow an authenticated user with permission to create or modify workflows to execute arbitrary operating system commands on the host running n8n. The flaw is tracked as CVE-2025-68668 and is rated 9.9 on the CVSS scale by the NVD entry. A fix is included in version 2.0.0.

KEY FACTS

  • Incident Sandbox bypass in the Python Code Node using Pyodide
  • CVE CVE-2025-68668, CVSS score 9.9
  • Affected versions 1.0.0 up to, but not including, 2.0.0
  • Fix Addressed in n8n version 2.0.0

A security advisory from n8n states the issue is a sandbox bypass in the Python Code Node that uses Pyodide and that an authenticated user with workflow create or modify permission can exploit it to execute commands as the n8n process on the host.

The vulnerability affects releases from 1.0.0 to before 2.0.0. The vendor introduced a task runner based native Python implementation as an optional feature in 1.111.0 and made that implementation the default in 2.0.0.

Workarounds include disabling the Code Node by setting the environment variable NODES_EXCLUDE: “[\”n8n-nodes-base.code\”]”, disabling Python support in the Code node by setting N8N_PYTHON_ENABLED=false, or configuring the task runner based Python sandbox with N8N_RUNNERS_ENABLED and N8N_NATIVE_PYTHON_RUNNER environment variables.

This disclosure follows an earlier critical vulnerability, CVE-2025-68613, which was also scored 9.9 and could lead to arbitrary code execution under certain conditions.

WHY IT MATTERS

The flaw allows users with workflow creation or modification privileges to run commands as the n8n process on the host, posing a high risk to deployed instances. Operators should upgrade to 2.0.0 or apply the listed mitigations.