{"id":"CVE-2026-56777","aliases":["GHSA-jwm3-qcfw-c5pp"],"url":"https://o3.security/vulnerability/CVE-2026-56777","summary":"n8n - AST Validator Bypass in Python Code Node","details":"## Impact\nAn 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.\n\nThis issue only affects instances where the Python Task Runner is enabled and `N8N_BLOCK_RUNNER_ENV_ACCESS=true`.\n\n## Patches\nThe 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.\n\n## Workarounds\nIf upgrading is not immediately possible, administrators should consider the following temporary mitigations:\n- Limit workflow creation and editing permissions to fully trusted users only.\n- Disable the Python Code node by adding `n8n-nodes-base.code` to the `NODES_EXCLUDE` environment variable, or disable the Python Task Runner entirely.\n\nThese workarounds do not fully remediate the risk and should only be used as short-term mitigation measures.","published":"2026-06-30T22:08:41.624Z","modified":"2026-10-31T02:30:52.661354432Z","cvss":null,"epss":{"score":0.00245,"percentile":0.16113,"asOf":"2026-08-23"},"cisaKev":null,"exploitsKnown":0,"affectedPackages":[{"ecosystem":"npm","name":"n8n","fixedVersion":"2.26.2"},{"ecosystem":"npm","name":"n8n","fixedVersion":"2.25.7"}],"fix":null,"references":[{"type":"ADVISORY","url":"https://github.com/CVEProject/cvelistV5/tree/main/cves/2026/56xxx/CVE-2026-56777.json"},{"type":"ADVISORY","url":"https://github.com/n8n-io/n8n/security/advisories/GHSA-jwm3-qcfw-c5pp"},{"type":"ADVISORY","url":"https://nvd.nist.gov/vuln/detail/CVE-2026-56777"},{"type":"ADVISORY","url":"https://www.vulncheck.com/advisories/n8n-ast-validator-bypass-in-python-code-node"},{"type":"PACKAGE","url":"https://github.com/n8n-io/n8n"}],"provenance":{"sources":["OSV.dev","FIRST.org (EPSS)"],"lastVerified":"2026-10-31T02:30:52.661354432Z"}}