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 products
Version statuses are supplied by the assigning organization. Consult the original record for detailed ranges and platform conditions.
n8n n8n
Default version status: unaffected
2.26.0 to < 2.26.2affected2.26.2unaffected
pkg:npm/n8nn8n n8n
Default version status: unaffected
0 to < 2.25.7affected2.25.7unaffected
pkg:npm/n8n