Executive brief
n8n is a workflow automation tool used to connect different software services and automate business tasks. A security flaw in its Python Code component allows authorized users to bypass safety restrictions and access sensitive internal system information. If exploited, an attacker could view environment variables, which often contain secret keys or credentials, potentially leading to further unauthorized access to connected business systems.
Technical details
An Incomplete List of Disallowed Inputs (CWE-184) vulnerability exists in n8n's Python Code node. The component uses an Abstract Syntax Tree (AST) validator to restrict code execution; however, this validator can be bypassed by an authenticated user with permissions to create or modify workflows. Successful exploitation allows access to the task executor module namespace. On self-hosted instances where the Python Task Runner is enabled and N8N_BLOCK_RUNNER_ENV_ACCESS is not strictly configured, this can lead to the disclosure of environment variables. The issue is fixed in versions 2.25.7 and 2.26.2.
Affected products
- n8n n8n < 2.25.7, 2.26.x < 2.26.2
Timeline
- 2026-06-10: advisory: GitHub Security Advisory published
- 2026-06-30: disclosed: NVD publication date