Impact
The vulnerability is an abstract syntax tree validator bypass in the Python Code node of n8n. An authenticated user with permission to create or modify workflows can inject code that bypasses the AST check and gains access to the task executor module namespace, allowing the attacker to read environment variables exposed by the task runner process when N8N_BLOCK_RUNNER_ENV_ACCESS permits it. This can reveal sensitive configuration data and potentially be leveraged for further execution within the task runner context.
Affected Systems
The flaw affects self‑hosted n8n installations running versions prior to 2.25.7 and 2.26.x before 2.26.2. Only instances with the Python Task Runner enabled are vulnerable, as the bypass relies on that component.
Risk and Exploitability
The CVSS score of 5.3 indicates moderate severity. EPSS data is currently unavailable, and the vulnerability is not listed in the CISA KEV catalog. Exploitation requires an authenticated session with workflow edit rights; once those credentials are held, the attacker can insert malicious Python code to disclose environment variables or otherwise manipulate the task runner environment. No public exploitation code is known, but the attack path is straightforward for legitimate users.
OpenCVE Enrichment