Attack ChainAIDerived
Hypothetical attack flow derived from CVE metadata – not a confirmed exploit chain
-
AccessAuthenticate to n8n with edit rights
-
DeliveryCreate workflow with Python Code Node
-
ExploitSubmit sandbox-escape payload
-
ExecutionTrigger workflow execution
-
PersistEscape Python sandbox in runner container
-
ImpactExecute arbitrary code, harvest secrets and pivot
Vulnerability Assessment
| Weakness |
CWE
OWASP Top 10:2025
A05:2025 - Injection
ASVS 5.0
V2 - Validation and Business Logic Input validation, allowlisting
|
| Exploitation Conditions | Exploitation requires an authenticated n8n account (CVSS PR:L) that holds permission to create or modify workflows, and the target instance must have the optional Python Task Runner enabled and the n8n-nodes-base.code Python Code Node available (i.e., not present in the NODES_EXCLUDE environment variable). No user interaction by another user is required (UI:N) and the attack is network-reachable to the n8n web UI/API (AV:N). Limiting factors: deployments that restrict workflow edit rights to trusted admins, that run only the JavaScript task runner, or that have excluded n8n-nodes-base.code are not exploitable. |
| Impact | The CVSS 4.0 vector (AV:N/AC:L/AT:N/PR:L/UI:N/VC:H/VI:L/VA:N) accurately reflects a network-reachable, low-complexity attack requiring low-privileged authenticated access with no user interaction, yielding high confidentiality impact but only low integrity and no availability impact on the vulnerable system, producing a base score of 7.1 (High). The PR:L requirement is significant: the attacker must already hold an n8n account with permission to create or edit workflows, which limits the population of viable attackers to insiders or those who have compromised a low-privileged account. No KEV listing, no EPSS score, and no public exploit identified at time of analysis suggest this is not yet a mass-exploitation target, but the precondition (Python Task Runner enabled) is operator-controlled and may not be universal, further narrowing real-world exposure. Defenders should still treat this as a meaningful privilege-escalation/lateral-movement primitive in multi-tenant n8n environments, since sandbox escape inside an automation engine effectively bypasses the trust boundary the platform advertises. |
| Exploit ScenarioDerived | An attacker who has obtained or been granted a low-privileged n8n account with workflow-edit rights (for example via phishing, credential stuffing, or insider abuse on a shared internal instance) creates or modifies a workflow containing a Python Code Node with sandbox-escaping payload. When the workflow executes, the payload breaks out of the Python sandbox and runs arbitrary commands inside the Python Task Runner container, allowing the attacker to read secrets accessible to the runner, pivot to connected systems via stored workflow credentials, or attempt container-to-host escalation. No public exploit identified at time of analysis, but the precondition (Python Task Runner enabled) is common in data-engineering deployments of n8n. |
Get an e-mail when this CVE is exploited, patched or re-scored. Free account.
Alert meAnalysisAIv5 – Jun 23, 2026
Sandbox escape in n8n workflow automation platform allows authenticated users with workflow edit privileges to execute arbitrary code on the Python Task Runner container via a crafted Python Code Node. The flaw affects n8n versions prior to 1.123.48, 2.21.8, and 2.22.4 when the optional Python Task Runner is enabled, and no public exploit identified at time of analysis. Successful exploitation grants code execution inside the task runner container, providing a foothold for further lateral movement within the n8n deployment.
Earlier versions of this analysis (4)
Sandbox escape in n8n Python Code Node allows authenticated workflow editors to achieve arbitrary code execution on the task runner container in instances with the Python Task Runner enabled. Affects n8n versions before 1.123.48, 2.21.8, and 2.22.4; no public exploit identified at time of analysis. The flaw enables tenant-isolation breakout within the automation platform, expanding what should be constrained scripting into full container code execution.
Authenticated sandbox escape in n8n workflow automation platform allows users with workflow creation/modification privileges to break out of the Python Code Node sandbox and execute arbitrary code on the underlying task runner container. The flaw affects n8n versions prior to 1.123.48, 2.21.8, and 2.22.4 when the Python Task Runner is enabled, and no public exploit identified at time of analysis. With CVSS 4.0 score of 7.1 (high) and vulnerable system confidentiality impact rated High, this represents a meaningful privilege escalation path within multi-tenant n8n deployments.
Authenticated sandbox escape in n8n workflow automation platform allows users with workflow create/modify permissions to break out of the Python Code Node sandbox and execute arbitrary code on the task runner container. The flaw only manifests when the Python Task Runner is enabled, and no public exploit was identified at the time of analysis. Fixes are available in n8n 1.123.48, 2.21.8, and 2.22.4.
Sandbox escape in n8n workflow automation platform allows authenticated users with workflow edit permissions to break out of the Python Code Node sandbox and execute arbitrary code on the task runner container. The flaw affects n8n versions prior to 1.123.48, 2.21.8, and 2.22.4 when the Python Task Runner is enabled, with publicly available exploit code exists via the published GHSA advisory text. Impact is constrained to deployments that have explicitly enabled the Python Task Runner feature, but allows lateral movement from a low-privileged workflow editor to full code execution inside the runner environment.
RemediationAI
Vendor-released patches are available - upgrade n8n to 1.123.48, 2.21.8, or 2.22.4 (or any later release on the respective branch) per advisory GHSA-9pq8-m8gp-4p53 at https://github.com/n8n-io/n8n/security/advisories/GHSA-9pq8-m8gp-4p53. If immediate upgrade is not possible, disable the Python Code node by adding n8n-nodes-base.code to the NODES_EXCLUDE environment variable, or disable the Python Task Runner entirely - the trade-off is that any existing workflows depending on Python execution will break and must be re-implemented using JavaScript or external services. As an additional administrative control, restrict workflow create/edit permissions to fully trusted operators, accepting that this reduces self-service automation across teams; the vendor explicitly notes these mitigations are partial and do not fully remediate the underlying sandbox escape.
Affected VersionsENISA
Affected Packages
Source: OSV (Open Source Vulnerabilities)
Affects your stack
Affects 2 packages in npm, euvd
Checking this CVE against your own stacks and servers is part of the Basic plan and up.
Technical ContextAI · show details
n8n is a popular open-source workflow automation platform (pkg:npm/n8n) that allows users to compose pipelines from reusable nodes, including a Python Code Node executed inside a dedicated Python Task Runner container. To safely execute user-supplied scripts, n8n relies on a sandboxing layer that restricts access to host resources and the underlying interpreter. This issue is classified as CWE-20 (Improper Input Validation), indicating that the Python Code Node fails to adequately validate or restrict script constructs, permitting an attacker to break out of the sandbox abstraction and run arbitrary Python in the runner container's process context.
Know when Python gets its next vulnerability
- Watch products and get an email when something new is published
- Check this CVE against your own stack and servers
- Exploit and PoC references, threat intelligence from 22 sources
No credit card · 7-day full trial
Severity by source
CVSS:4.0/AV:N/AC:L/AT:N/PR:L/UI:N/VC:H/VI:L/VA:N/SC:N/SI:N/SA:N
Network-reachable n8n UI/API with authenticated low-priv account (PR:L), no user interaction, sandbox escape yields full code execution in runner container so C/I/A:H.
Primary rating from Vendor (https://github.com/n8n-io/n8n).
CVSS VectorVendor: https://github.com/n8n-io/n8n
Lifecycle Timeline
5DescriptionCVE.org
Impact
An authenticated user with permission to create or modify workflows containing a Python Code Node could escape the sandbox and achieve arbitrary code execution on the task runner container.
This issue only affects instances where the Python Task Runner is enabled.
Patches
The issue has been fixed in n8n versions 1.123.48, 2.21.8, and 2.22.4. Users should upgrade to one of these versions or later to remediate the vulnerability.
Workarounds
If upgrading is not immediately possible, administrators should consider the following temporary mitigations:
- Limit workflow creation and editing permissions to fully trusted users only.
- Disable the Python Code node by adding
n8n-nodes-base.codeto theNODES_EXCLUDEenvironment variable, or disable the Python Task Runner entirely.
These workarounds do not fully remediate the risk and should only be used as short-term mitigation measures.
Articles & Coverage 1
Executive ViewAI
An authenticated vulnerability in n8n's Python Task Runner component allows users with workflow editing privileges to execute arbitrary code on the task runner container, creating a foothold for lateral movement within the n8n deployment. Organizations using n8n for workflow automation and integrations face potential compromise of connected systems and data if the Python Task Runner feature is enabled. This requires prompt access restriction and patching to prevent insider-threat code execution.
If immediate patching is delayed: revoke workflow edit privileges from non-admin users; disable Python Task Runner feature if unused; enable audit logging on all Python Task Runner executions; implement network segmentation to limit lateral movement from the task runner container to sensitive systems.
Threat Intelligence Overview
How this decision was reached
The engine reads each signal below and applies a fixed list of rules from top to bottom. The first rule that matches sets the recommended action – like a statement, every line is shown.
What every action level means
SSVC AssessmentENISA
Priority Score
Attack Technique
Remote Code Execution represents the critical moment when an attacker successfully runs arbitrary code on a target system without physical access.
Wazuh SIEM platform versions 4.4.0 through 4.9.0 contain an unsafe deserialization vulnerability in the DistributedAPI t
BentoML version 1.4.2 and earlier contains an unauthenticated remote code execution vulnerability through insecure deser
pgAdmin 4 contains critical remote code execution vulnerabilities in the Query Tool download and Cloud Deployment endpoi
The renderLocalView function in render/views.py in graphite-web in Graphite 0.9.5 through 0.9.10 uses the pickle Python
BentoML is a Python library for building online serving systems optimized for AI apps and model inference. Rated critica
OpenSSL before 0.9.8za, 1.0.0 before 1.0.0m, and 1.0.1 before 1.0.1h does not properly restrict processing of ChangeCiph
pyLoad download manager version prior to 0.5.0b3.dev77 exposes the Flask SECRET_KEY through an unauthenticated endpoint.
Langflow (a visual LLM pipeline builder) contains a critical unauthenticated code execution vulnerability (CVE-2026-3301
In Mercurial before 4.1.3, "hg serve --stdio" allows remote authenticated users to launch the Python debugger, and conse
Unauthenticated remote code execution affects Kestra OSS (the open-source event-driven orchestration platform) prior to
Unauthenticated remote code execution in Marimo ≤0.20.4 allows attackers to execute arbitrary system commands via the `/
pyLoad is the free and open-source Download Manager written in pure Python. Rated medium severity (CVSS 5.3), this vulne
EUVD-2026-38481
GHSA-9pq8-m8gp-4p53
NVD
CVE.org
EPSS
Vulnrichment
VulDB
Exploit-DB