{"id":"CVE-2026-56777","aliases":["CVE-2026-56777","GHSA-jwm3-qcfw-c5pp"],"related":[],"kind":"vulnerability","state":"published","title":"n8n - AST Validator Bypass in Python Code Node","summary":"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.","summarySource":"cvelist","descriptions":[{"lang":"en","text":"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.","source":"cvelist"},{"lang":"en","text":"## 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.","format":"markdown","source":"ghsa"},{"lang":"es","text":"n8n anterior a 2.25.7 y 2.26.x anterior a 2.26.2 contiene una omisión del validador de seguridad del árbol de sintaxis abstracta (AST) en el nodo de Código Python. Un usuario autenticado con permiso para crear o modificar flujos de trabajo que contengan un nodo de Código Python puede omitir el validador y acceder al espacio de nombres del módulo ejecutor de tareas. El problema solo afecta a instancias autoalojadas donde el Ejecutor de Tareas Python está habilitado; donde N8N_BLOCK_RUNNER_ENV_ACCESS está configurado para permitirlo, esto puede divulgar variables de entorno accesibles para el proceso del ejecutor de tareas.","source":"nvd"}],"published":"2026-06-16T22:39:46.000Z","modified":"2026-10-29T21:16:00.131Z","severity":{"scorer":"VulnCheck","scheme":"CVSS:4.0","vector":"CVSS:4.0/AV:N/AC:L/AT:N/PR:L/UI:N/VC:L/VI:N/VA:N/SC:L/SI:N/SA:N","score":5.3,"rating":"MEDIUM"},"severities":[{"scorer":"VulnCheck","scheme":"CVSS:4.0","vector":"CVSS:4.0/AV:N/AC:L/AT:N/PR:L/UI:N/VC:L/VI:N/VA:N/SC:L/SI:N/SA:N","score":5.3,"rating":"MEDIUM"},{"scorer":"VulnCheck","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:C/C:L/I:N/A:N","score":5,"rating":"MEDIUM"},{"scorer":"GitHub","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:C/C:L/I:N/A:N","score":5,"rating":"MEDIUM"},{"scorer":"GitHub","scheme":"CVSS:4.0","vector":"CVSS:4.0/AV:N/AC:L/AT:N/PR:L/UI:N/VC:L/VI:N/VA:N/SC:N/SI:N/SA:N","rating":"MEDIUM"}],"cwes":["CWE-184","CWE-693"],"affected":[{"ranges":[{"type":"semver","introduced":"2.26.0","fixed":"2.26.2","status":"affected"},{"type":"semver","version":"2.26.2","status":"unaffected"}],"vendor":"n8n","product":"n8n","source":"cvelist"},{"ranges":[{"type":"semver","introduced":"0","fixed":"2.25.7","status":"affected"},{"type":"semver","version":"2.25.7","status":"unaffected"}],"vendor":"n8n","product":"n8n","source":"cvelist"},{"ranges":[{"type":"semver","introduced":"2.26.0","status":"affected","fixed":"2.26.2"}],"ecosystem":"npm","package":"n8n","purl":"pkg:npm/n8n","source":"ghsa"},{"ranges":[{"type":"semver","introduced":"0","status":"affected","fixed":"2.25.7"}],"ecosystem":"npm","package":"n8n","purl":"pkg:npm/n8n","source":"ghsa"},{"ranges":[{"status":"affected","fixed":"2.25.7"},{"status":"affected","introduced":"2.26.0","fixed":"2.26.2"}],"vendor":"n8n","product":"n8n","cpe":"cpe:2.3:a:n8n:n8n:*:*:*:*:*:node.js:*:*","source":"nvd"}],"references":[{"url":"https://github.com/n8n-io/n8n/security/advisories/GHSA-jwm3-qcfw-c5pp","tags":["mitigation","vendor-advisory","web"],"sources":["cvelist","ghsa","nvd"]},{"url":"https://www.vulncheck.com/advisories/n8n-ast-validator-bypass-in-python-code-node","tags":["third-party-advisory"],"sources":["cvelist","nvd"]},{"url":"https://github.com/n8n-io/n8n","tags":["package"],"sources":["ghsa"]}],"credits":["Mistz1"],"assigner":"VulnCheck","ssvc":{"scorer":"CISA-ADP","exploitation":"none","automatable":"no","technicalImpact":"partial","date":"2026-07-01T13:49:24.886Z"},"sources":[{"source":"cvelist","name":"CVE List","id":"CVE-2026-56777","url":"https://www.cve.org/CVERecord?id=CVE-2026-56777","licence":"CVE Terms of Use","modified":"2026-10-29T21:16:00.131Z"},{"source":"ghsa","name":"GitHub Advisory Database","id":"GHSA-jwm3-qcfw-c5pp","url":"https://github.com/advisories/GHSA-jwm3-qcfw-c5pp","licence":"CC-BY-4.0","modified":"2026-07-08T08:27:03.875Z"},{"source":"nvd","name":"NVD","id":"CVE-2026-56777","url":"https://nvd.nist.gov/vuln/detail/CVE-2026-56777","licence":"Public domain","modified":"2026-10-29T19:17:23.337Z"}],"updatedAt":"2026-11-25T22:59:26.853Z","epss":{"score":0.003,"percentile":0.24428,"date":"2026-12-01T12:00:22.000Z"}}