Severe n8n Security Flaw (CVSS 9.9) Allows Authenticated Users to Run System Commands
A serious new security issue has been discovered in n8n, the popular open-source workflow automation tool, and it’s raising real concern among users. This flaw could allow an attacker who already has access to n8n to run dangerous system commands directly on the server where n8n is installed.
The vulnerability is tracked as CVE-2025-68668 and carries a CVSS score of 9.9, putting it in the critical category. At its core, the problem is caused by a failure in how certain security protections were designed and enforced.
This issue impacts n8n versions from 1.0.0 up to (but not including) 2.0.0. Any authenticated user who has permission to create or edit workflows could exploit this weakness to execute operating system commands on the host machine. Thankfully, the issue has been fixed in n8n version 2.0.0.
According to the official advisory, “A sandbox bypass vulnerability exists in the Python Code Node that uses Pyodide.” In simple terms, this means the sandbox meant to safely isolate Python code can be escaped. An attacker with workflow access could abuse this flaw to run commands on the host system with the same privileges as the n8n service itself — a frightening level of access.
n8n explained that it had already been working on improving security. In version 1.111.0, the team introduced a task runner-based native Python implementation as an optional feature to improve isolation and reduce risk. This feature could be enabled using the N8N_RUNNERS_ENABLED and N8N_NATIVE_PYTHON_RUNNER environment variables. With the release of version 2.0.0, this safer approach is now enabled by default, offering stronger protection out of the box.
For users who cannot upgrade immediately, n8n has shared several temporary mitigation steps to reduce risk:
- Disable the Code Node entirely by setting the environment variable NODES_EXCLUDE: "[\"n8n-nodes-base.code\"]"
- Turn off Python support in the Code Node by setting N8N_PYTHON_ENABLED=false
- Enable the task runner-based Python sandbox using
N8N_RUNNERS_ENABLEDandN8N_NATIVE_PYTHON_RUNNER
This disclosure comes shortly after n8n patched another critical vulnerability, CVE-2025-68613 (also rated 9.9), which could lead to arbitrary code execution under specific conditions. Together, these incidents highlight just how important it is for n8n users to stay alert, apply updates quickly, and review their security settings carefully.
