Executive brief
n8n is a workflow automation platform that allows users to create and execute automated tasks. A sandbox escape vulnerability in the Python Task Runner component allows authenticated users to break out of the sandboxed execution environment and run arbitrary code directly on the container running the task execution service. This could lead to unauthorized access to sensitive data, system compromise, or disruption of automation workflows. The vulnerability only affects instances where the Python Task Runner feature is enabled.
Technical details
This vulnerability is a code injection/sandbox escape (CWE-94) in n8n's Python Task Runner. An authenticated user with permission to create or modify workflows can craft a malicious Python Code Node that escapes the sandbox and achieves arbitrary code execution on the task runner container. The attack vector is network-based with low complexity and requires low-level privileges (authentication) but no user interaction. The vulnerability affects all versions prior to the fixed releases: before 1.123.32, before 2.17.4 (for 2.17.x branch), and before 2.18.1 (for 2.18.x branch). Patches have been released and users should upgrade immediately. Temporary workarounds include restricting workflow editing permissions to trusted users, disabling the Python Code node via NODES_EXCLUDE environment variable, or disabling the Python Task Runner entirely.
Affected products
- n8n n8n < 1.123.32, 2.17.0 - 2.17.3, 2.18.0
Timeline
- 2026-04-29: disclosed
- 2026-04: patched: Patches available in versions 1.123.32, 2.17.4, and 2.18.1