Attack ChainAIDerived
Hypothetical attack flow derived from CVE metadata – not a confirmed exploit chain
-
AccessAuthenticate to self-hosted n8n instance
-
DeliveryOpen or create workflow with Python Code node
-
ExploitCraft AST payload evading blocklist validator
-
ExecutionExecute payload via Python Task Runner
-
ImpactRead environment variables from runner process namespace
Vulnerability Assessment
| Weakness |
CWE
OWASP Top 10:2025
A05:2025 - Injection
ASVS 5.0
V2 - Validation and Business Logic Input validation completeness
|
| Exploitation Conditions | Exploitation requires all of the following to be simultaneously true: (1) the n8n instance must be self-hosted - cloud-hosted n8n.cloud deployments are explicitly out of scope per the advisory; (2) the Python Task Runner must be enabled in the deployment configuration (this is not the default for most n8n installations); (3) N8N_BLOCK_RUNNER_ENV_ACCESS must be set to a permissive value rather than the restrictive setting that blocks runner environment access; and (4) the attacker must be an authenticated user holding permission to create or modify workflows that include Python Code nodes (PR:L per the CVSS 4.0 vector). Exploitation is bounded by: the requirement for valid n8n credentials with workflow-edit privileges, the non-default nature of the Python Task Runner, the specific N8N_BLOCK_RUNNER_ENV_ACCESS configuration state, and the self-hosted deployment requirement. Unauthenticated remote attackers and users without workflow-edit privileges cannot exploit this vulnerability. |
| Impact | The vendor-supplied CVSS 4.0 score of 5.3 (Medium) with vector AV:N/AC:L/AT:N/PR:L/UI:N/VC:L/VI:N/VA:N/SC:L/SI:N/SA:N reflects network-accessible exploitation by a low-privileged user with limited confidentiality impact. Real-world risk is substantially gated by two independent deployment conditions that must both be true: the Python Task Runner must be actively enabled (a non-default feature), and N8N_BLOCK_RUNNER_ENV_ACCESS must be configured to permit runner environment access rather than block it. This two-condition gate means the vast majority of n8n deployments - including all cloud-hosted n8n.cloud instances - are entirely unaffected. The attacker must also hold authenticated credentials with workflow-edit privileges, ruling out anonymous or external opportunistic exploitation. No CISA KEV listing and no public exploit code are present in the available intelligence, and EPSS data was not provided, so exploitation probability cannot be quantified beyond noting the prerequisite barriers. This is a low-urgency finding for most operators and a medium-priority hardening item only for self-hosted operators who have explicitly enabled the Python Task Runner. |
| Exploit ScenarioDerived | An authenticated n8n user with workflow-edit rights opens or creates a workflow and inserts a Python Code node containing an AST construct specifically shaped to pass the incomplete blocklist validator while still referencing the task executor's module namespace at runtime. On a self-hosted instance where the Python Task Runner is active and N8N_BLOCK_RUNNER_ENV_ACCESS is permissive, the script executes and enumerates environment variables - potentially exposing database passwords, third-party API keys, or internal service tokens injected at container or process startup. No public proof-of-concept code is known at time of analysis. |
Get an e-mail when this CVE is exploited, patched or re-scored. Free account.
Alert meAnalysisAIv1 – Jun 30, 2026
The Python Code node in n8n allows authenticated workflow editors to bypass the AST security validator by crafting Python code that evades an incomplete blocklist (CWE-184), reaching the task executor module namespace. Affected self-hosted n8n deployments running versions before 2.25.7 or 2.26.x before 2.26.2 with the Python Task Runner enabled are exposed to environment variable disclosure when N8N_BLOCK_RUNNER_ENV_ACCESS is not set to restrict access, potentially leaking API keys, database credentials, or other secrets injected at process startup. No public exploit code exists and no active exploitation has been confirmed at time of analysis.
RemediationAI
Upgrade n8n to version 2.25.7 or later on the 2.25.x track, or to 2.26.2 or later on the 2.26.x track, per the vendor security advisory at https://github.com/n8n-io/n8n/security/advisories/GHSA-jwm3-qcfw-c5pp. If an immediate upgrade is not feasible, set the N8N_BLOCK_RUNNER_ENV_ACCESS environment variable to its restrictive value to prevent the task runner from exposing environment variables to user code - this eliminates the primary sensitive-data disclosure path without disabling the runner entirely, though it may affect workflows that intentionally consume environment variables. Alternatively, disabling the Python Task Runner feature entirely removes all attack surface for this vulnerability but prevents use of Python Code nodes. Restricting workflow-create and workflow-edit permissions to a minimal set of trusted users reduces the attacker pool but does not remediate the underlying validator bypass.
Affected VersionsENISA
Affected Packages
Source: OSV (Open Source Vulnerabilities)
Affects your stack
Affects 1 package in npm
Checking this CVE against your own stacks and servers is part of the Basic plan and up.
Technical ContextAI · show details
n8n is an open-source workflow automation platform that supports user-defined logic in Code nodes, including a Python Code node executed by a dedicated Python Task Runner subprocess. To restrict dangerous operations in user-supplied scripts, n8n implements an AST-based security validator that inspects the parsed syntax tree before execution. CWE-184 (Incomplete List of Disallowed Inputs) is the root cause: the validator's blocklist does not enumerate all code paths capable of reaching the task executor's module namespace, so a crafted AST node that is not on the blocklist passes validation and executes with runner-level access. The Python Task Runner operates as a separate process whose environment may contain secrets propagated via environment variables at process startup. The CPE identifier cpe:2.3:a:n8n:n8n:*:*:*:*:*:*:*:* covers all n8n application versions across all platforms.
Know when N8n 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:L/VI:N/VA:N/SC:L/SI:N/SA:N
Authenticated workflow editor required (PR:L); confidentiality limited to env vars in runner process (C:L); no integrity or availability impact; scope unchanged.
Primary rating from Vendor (VulnCheck).
CVSS VectorVendor: VulnCheck
Lifecycle Timeline
1DescriptionCVE.org
n8n before 2.25.7 and 2.26.x before 2.26.2 contains an abstract syntax tree (AST) security validator bypass in the Python Code node. An authenticated user with permission to create or modify workflows containing a Python Code node can bypass the validator and access the task executor module namespace. The issue only affects self-hosted instances where the Python Task Runner is enabled; where N8N_BLOCK_RUNNER_ENV_ACCESS is configured to allow it, this can disclose environment variables accessible to the task runner process.
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
Information disclosure occurs when an application unintentionally exposes sensitive data that aids attackers in reconnaissance or directly compromises security.
Remote code execution in n8n's workflow expression evaluation system allows an authenticated user with workflow creation
n8n workflow automation (through 1.121.2) allows authenticated users to execute arbitrary code via the n8n service, with
n8n workflow automation (1.65.0 to 1.121.0) allows unauthenticated file access through form-based workflows. A critical
n8n has a fifth critical RCE vulnerability (CVSS 9.9) in the Expression evaluator, enabling code execution through craft
Authenticated users who can create or modify an n8n workflow can achieve remote code execution on the n8n host by abusin
A prototype pollution vulnerability in the XML and GSuiteAdmin nodes of n8n workflow automation platform allows authenti
An authenticated user with workflow creation or modification privileges in n8n workflow automation platform can exploit
n8n-workflows Main Commit ee25413 allows attackers to execute a directory traversal via the download_workflow function w
Second-order expression injection in n8n workflow automation before 2.10.1/2.9.3/1.123.22. Crafted workflow data trigger
An arbitrary file upload vulnerability in the Chat Trigger component of N8N v1.95.3, v1.100.1, and v1.101.1 allows attac
Authenticated n8n users can hijack administrator accounts when LDAP authentication is enabled by manipulating their LDAP
The n8n package 0.218.0 for Node.js allows Escalation of Privileges. Rated high severity (CVSS 8.8), this vulnerability
EUVD-2026-40453
GHSA-x2rh-rhm8-cv8v
NVD
CVE.org
EPSS
Vulnrichment
VulDB
Exploit-DB