Executive brief
n8n is a workflow automation tool used to connect different software services and automate business tasks. A security flaw allows an authorized user to bypass security restrictions within the Python code execution environment. If exploited, an attacker could run unauthorized commands on the underlying server, potentially leading to data theft or further access to the internal network.
Technical details
A sandbox escape vulnerability exists in n8n's Python Code Node due to improper input validation (CWE-20). An authenticated attacker with privileges to create or edit workflows can bypass the restricted execution environment to execute arbitrary code on the host task runner container. This issue specifically affects instances where the Python Task Runner is enabled. The vulnerability allows for high confidentiality impact but limited integrity impact on the vulnerable system. Patches are available in versions 1.123.48, 2.21.8, and 2.22.4. Temporary mitigations include disabling the Python Code node or restricting workflow permissions to trusted users.
Affected products
- n8n-io n8n < 1.123.48, >= 2.0.0-rc.0 < 2.21.8, >= 2.22.0 < 2.22.4
Timeline
- 2026-05-27: advisory: Original GitHub security advisory published
- 2026-06-23: disclosed: NVD publication date