N8n-io n8n
n8n Vulnerable to Arbitrary Command Execution in Pyodide based Python Code Node
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.
Affected versions and mitigation
From the CVE record and the vendor's references.Affected
- >= 1.0.0, < 2.0.0
Fixed in 2.0.0
Mitigation
Upgrade n8n to 2.0.0 or later.
References
- Vendor advisory github.com/n8n-io/n8n/security/advisories/GHSA…
Timeline
Days relative to CVE publicationNo public PoC found yet; not in CISA KEV.
PoC repositories
Found on GitHub.4 not a PoC
Not a PoC 4
| Repository | Created | Stars | Assessment |
|---|---|---|---|
| Chocapikk/CVE-2026-21858 | 7 Jan 2026 +12 d | 307 | Not a PoC · unrelated |
| Alhakim88/CVE-2026-21858 | 30 Jan 2026 +35 d | 0 | Not a PoC · unrelated |
| kaleth4/CVE-2026-21858 | 9 Apr 2026 +104 d | 0 | Not a PoC · unrelated |
| Fomovet/cve-2026-21858 | 21 Jun 2026 +177 d | 1 | Not a PoC · unrelated |
Only PoCs count toward the first-PoC date and the characteristics below. Do not run PoC code from unknown sources.