A security flaw has been found in n8n, a popular workflow automation tool. This vulnerability, identified as an Abstract Syntax Tree (AST) security validator bypass, affects the Python Code node within n8n workflows. It allows an authenticated user, who has the ability to create or change workflows, to gain unauthorized access to critical system components. Specifically, they can bypass a security check and access the task executor module namespace. In self-hosted setups where the Python Task Runner is active and configured to permit it, this could even lead to the exposure of environment variables, potentially revealing sensitive configuration details.
CVE Details
Product: n8n
Published Date: June 30, 2026
Severity: MEDIUM
Status: Analyzed
Affected Products
The vulnerability impacts n8n versions before 2.25.7 and n8n 2.26.x versions before 2.26.2.
Current Status
This vulnerability has been analyzed and publicly disclosed.
Severity Level
Rated as MEDIUM severity, this vulnerability could allow an authenticated attacker to access sensitive information or potentially manipulate workflow execution. While not immediately critical, it poses a significant risk, especially in environments handling sensitive data or operations. An attacker must first be an authenticated user with specific permissions. However, successful exploitation could expose environment variables, which often contain sensitive data like API keys, database credentials, or other secrets, thereby increasing the risk of further compromise to the system or connected services.
Possible Solutions
The most effective way to address this vulnerability is to upgrade your n8n instance. Patched versions are available:
- Upgrade to n8n version 2.25.7 or later.
- Upgrade to n8n version 2.26.2 or later (for users on the 2.26.x branch).
If an immediate upgrade isn’t possible, consider these temporary mitigation steps:
- Restrict workflow creation and editing permissions to only fully trusted users.
- Disable the Python Code node by adding
n8n-nodes-base.codeto yourNODES_EXCLUDEenvironment variable. - Alternatively, disable the Python Task Runner entirely.
Please note that these workarounds are not full fixes and should only be used as short-term measures until you can apply the official patches.
References
https://github.com/n8n-io/n8n/security/advisories/GHSA-jwm3-qcfw-c5pp
https://www.vulncheck.com/advisories/n8n-ast-validator-bypass-in-python-code-node


