Sandbox escape in n8n Python task runner allows for arbitrary code execution on the underlying host.
Using string formatting and exception handling, an attacker may bypass n8n's python-task-executor sandbox restrictions and run arbitrary unrestricted Python code in the underlying operating system. The vulnerability can be exploited via the Code block by an authenticated user with basic permissions and can lead to a full n8n instance takeover on instances operating under "Internal" execution mode. If the instance is operating under the "External" execution mode (ex. n8n's official Docker image) - arbitrary code execution occurs inside a Sidecar container and not the main node, which significantly reduces the vulnerability impact.
Affected versions and mitigation
From the CVE record and the vendor's references.Affected
- >= 2.4.0, < 2.4.2
- < 1.123.14
- >= 2.0.0, < 2.3.5
Fixed in 2.4.2, 1.123.14, 2.3.5
Mitigation
Upgrade the affected product to 2.4.2 or 1.123.14 or 2.3.5 or later.
References
Timeline
Days relative to CVE publicationNo public PoC found yet; not in CISA KEV.
PoC repositories
Found on GitHub.No PoC repositories found yet.