CVE-2026-56777
mediumpriority · track · 0EPSS 0.003 · 26 %ileDEEUUSEPSS · scored 2026-10-27
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.
cvss
Technical severity, 0–10. One row per scoring source.
base score 0–10 · higher = more severe · hover a vector to decode⚠ sources disagree · low–medium · 1.3–5.3
ssvc
A stakeholder decision — act, attend, or track — from exploitation and impact.
weaknesses
The CWE weakness classes this flaw belongs to.
affected products (12)
Products and version ranges known to be affected.
advisories (2)
Vendor and ecosystem advisories describing this.
- WID-SEC-W-2026-1875n8n: Mehrere SchwachstellenDeutsch2026-06-10csaf · cert_bundDE
Ein Angreifer kann mehrere Schwachstellen in n8n ausnutzen, um beliebigen Code auszuführen, Sicherheitsmaßnahmen zu umgehen, SQL-Injection- und Cross-Site-Scripting-Angriffe durchzuführen, Daten zu manipulieren, einen Denial-of-Service-Zustand zu verursachen oder vertrauliche Informationen offenzulegen, was weitere Angriffe einschließlich einer Rechteausweitung ermöglichen kann.
- GHSA-jwm3-qcfw-c5ppn8n: Python Code Node AST Validator Bypass2026-06-16ghsa · osvUS
## Impact An authenticated user with permission to create or modify workflows containing a Python Code node could bypass the AST security validator and access the task executor module namespace. On self-hosted instances where `N8N_BLOCK_RUNNER_ENV_ACCESS=false` is set, this extended to disclosure of environment variables accessible to the task runner process. This issue only affects instances where the Python Task Runner is enabled and `N8N_BLOCK_RUNNER_ENV_ACCESS=true`. ## Patches The issue has been fixed in n8n versions 2.25.7, and 2.26.2. 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.code` to the `NODES_EXCLUDE` environment 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.
also known as (3)
Other names and identifiers for this entity.
sources
Which sources assert this record, and when.
references (6)
External citations — patches, advisories, analysis.
- https://github.com/n8n-io/n8n/security/advisories/GHSA-jwm3-qcfw-c5ppcnnvd
- https://www.vulncheck.com/advisories/n8n-ast-validator-bypass-in-python-code-nodecnnvd
- https://github.com/n8n-io/n8n/security/advisories/GHSA-jwm3-qcfw-c5ppenisa_euvd
- https://www.vulncheck.com/advisories/n8n-ast-validator-bypass-in-python-code-nodeenisa_euvd
- https://github.com/n8n-io/n8n/security/advisories/GHSA-jwm3-qcfw-c5ppMitigationVendor Advisorynvd
- https://www.vulncheck.com/advisories/n8n-ast-validator-bypass-in-python-code-nodeThird Party Advisorynvd
Attackers weaponise vulnerabilities like this against internet-exposed services. See what is exposed on your perimeter with a free passive scan.
Free scan