Skip to content
n8nGHSA-8398-gmmx-564h

n8n has a Python sandbox escape

Critical9.9CVE-2026-25115 · Published Feb 4, 2026 · updated Mar 25, 2026

## Impact A vulnerability in the Python Code node allows authenticated users to break out of the Python sandbox environment and execute code outside the intended security boundary. Only authenticated users are able to execute code through Task Runners. This issue affected any deployment in which the following conditions were met: - Task Runners were enabled using `N8N_RUNNERS_ENABLED=true` (default: false) - Python was enabled `N8N_PYTHON_ENABLED=true` - Code Node was enabled (default: true) In case the `N8N_RUNNERS_MODE` is set to `external` (default: `internal`) the sandbox escape is limited to the sidecar container with lower risk for lateral movement. In that case a lower high severity is more appropriate. ## Patches This vulnerability is fixed in version 2.4.8 and later. ## Workarounds If an immediate upgrade cannot be applied, the following hardening steps are recommended: - Disable the Code Node by adding `n8n-nodes-base.code` to the `NODES_EXCLUDE` environment variable - Prefer external mode for isolation: run Task Runners in external mode so that untrusted task code executes in a separate sidecar container rather than within the main n8n process. This configurati...

GitHub advisory

Affected versions

PackageAffectedFixed in
n8n
npm
< 2.4.82.4.8
Details and references

## Impact A vulnerability in the Python Code node allows authenticated users to break out of the Python sandbox environment and execute code outside the intended security boundary. Only authenticated users are able to execute code through Task Runners. This issue affected any deployment in which the following conditions were met: - Task Runners were enabled using `N8N_RUNNERS_ENABLED=true` (default: false) - Python was enabled `N8N_PYTHON_ENABLED=true` - Code Node was enabled (default: true) In case the `N8N_RUNNERS_MODE` is set to `external` (default: `internal`) the sandbox escape is limited to the sidecar container with lower risk for lateral movement. In that case a lower high severity is more appropriate. ## Patches This vulnerability is fixed in version 2.4.8 and later. ## Workarounds If an immediate upgrade cannot be applied, the following hardening steps are recommended: - Disable the Code Node by adding `n8n-nodes-base.code` to the `NODES_EXCLUDE` environment variable - Prefer external mode for isolation: run Task Runners in external mode so that untrusted task code executes in a separate sidecar container rather than within the main n8n process. This configuration significantly reduces the risk of in-process memory disclosure caused by unsafe buffer [allocations.In](http://allocations.in/) external mode, a launcher manages Task Runner processes in a dedicated sidecar environment, separate from the primary n8n instance. See the [[n8n documentation](https://docs.n8n.io/hosting/configuration/task-runners/)](https://docs.n8n.io/hosting/configuration/task-runners/) for configuration details and required environment variables. ## Resources - [n8n Documentation , Task Runners](https://docs.n8n.io/hosting/configuration/task-runners/) , external mode, setup guide, and environment configuration details - [n8n Documentation , Blocking nodes](https://docs.n8n.io/hosting/securing/blocking-nodes/) , how to globally disable specific nodes

CVSS 3.1
CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:C/C:H/I:H/A:H
Severity from
GitHub (reviewed advisory)
Weakness
CWE-693
Also known as
CVE-2026-25115

More n8n advisories

All n8n
Advisory
n8n's domain allowlist bypass enables credential exfiltration
MediumFeb 4
n8n Merge Node has Arbitrary File Write leading to RCE
CriticalFeb 4
n8n Vulnerable to Arbitrary File Write on Remote Systems via SSH Node
HighFeb 4
n8n Has Stored Cross-site Scripting via Markdown Rendering in Workflow UI
HighFeb 4
n8n has OS Command Injection in Git Node
CriticalFeb 4
n8n's Improper File Access Controls Allow Arbitrary File Read by Authenticated Users
CriticalFeb 4

Critical advisories by email

Wednesdays: the week’s critical and high advisories in the AI and data stack, with the fixed versions. Only in weeks that have some.

Double opt-in. Unsubscribe any time.