CVE-2026-56777
JSON

5.3medium

n8n - AST Validator Bypass in Python Code Node

Severity
5.3medium CVSS:4.0 by VulnCheck
Exploit likelihood
0.30% (higher than 24% of CVEs; EPSS, by FIRST)
Published
Last changed
Assigned by
VulnCheck
Also known as
GHSA-jwm3-qcfw-c5pp

Description

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.

Affected

Product or packageVersionsReported by
n8n n8nfrom 2.26.0 before 2.26.2, before 2.25.7
Not affected: 2.26.2, 2.25.7
CVE List, NVD
n8n (npm)from 2.26.0 before 2.26.2, before 2.25.7GitHub Advisory Database

All scores

VulnCheck5.3medium CVSS:4.0CVSS:4.0/AV:N/AC:L/AT:N/PR:L/UI:N/VC:L/VI:N/VA:N/SC:L/SI:N/SA:N
VulnCheck5.0medium CVSS:3.1CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:C/C:L/I:N/A:N
GitHub5.0medium CVSS:3.1CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:C/C:L/I:N/A:N
GitHubmedium CVSS:4.0CVSS:4.0/AV:N/AC:L/AT:N/PR:L/UI:N/VC:L/VI:N/VA:N/SC:N/SI:N/SA:N

Classification

CWE-184CWE-693

SSVC (CISA-ADP): exploitation none, automatable no, technical impact partial.

What each source says

CVE List

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.

GitHub Advisory Database

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.

NVD (es)

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.

References

Sources

SourceRecordLicence
CVE ListCVE-2026-56777 changed 2026-10-29CVE Terms of Use
GitHub Advisory DatabaseGHSA-jwm3-qcfw-c5pp changed 2026-07-08CC-BY-4.0
NVDCVE-2026-56777 changed 2026-10-29Public domain