CVEReports
CVEReports

Automated vulnerability intelligence platform. Comprehensive reports for high-severity CVEs generated by AI.

Product

  • Home
  • Sitemap
  • RSS Feed

Company

  • About
  • Contact
  • Privacy Policy
  • Terms of Service

© 2026 CVEReports. All rights reserved.

Made with love by Amit Schendel & Alon Barad



GHSA-JWM3-QCFW-C5PP

GHSA-jwm3-qcfw-c5pp: Security Bypass in n8n Python Code Node AST Validator

Amit Schendel
Amit Schendel
Senior Security Researcher

Jun 17, 2026·6 min read·8 visits

Executive Summary (TL;DR)

Authenticated users can bypass n8n's Python Code Node AST validator, escaping the execution sandbox to access host environment variables and process namespaces.

An authenticated security-bypass vulnerability in n8n allows users with workflow creation or modification privileges to bypass the Python AST security validator. By circumventing AST validation logic, attackers can execute arbitrary statements, access the task executor's root module namespace, and disclose sensitive host environment variables on self-hosted instances.

Vulnerability Overview

The n8n workflow automation platform exposes an extensive attack surface through its Code node, which permits administrators and authorized editors to run custom JavaScript or Python scripts. To support Python execution safely, n8n invokes a separate helper runtime called the Python Task Runner. The platform relies on a static analysis protection mechanism to prevent users from executing arbitrary system actions or escaping their local task environment.

This protection mechanism is implemented as an Abstract Syntax Tree (AST) security validator. The validator parses the incoming script structure and prevents execution if it encounters blacklisted nodes, references to dangerous methods, or access to sensitive global fields. This control aims to keep the user script isolated within a limited virtual execution environment.

GHSA-jwm3-qcfw-c5pp describes a critical logic flaw in this validator that allows authenticated workflow creators to evade detection rules. Successful evasion allows the execution of restricted statements that bypass standard execution limits. This escape grants immediate access to the module namespace of the task executor process, risking system-wide credential exposure.

Root Cause Analysis

The root cause of this vulnerability lies in the structural incompleteness of the AST verification routines within the n8n Python parsing logic. The security validator utilizes a static checking framework that parses code into an AST and iterates over specific node types to check for prohibited patterns. Specifically, it searches for direct node classifications like ast.Import or standard attribute lookups (ast.Attribute) that match sensitive strings.

However, this implementation fails to recursively and securely analyze nested expressions inside complex AST nodes, such as formatted string literals represented by ast.JoinedStr or dynamic functions like getattr. An f-string containing nested expressions evaluates dynamically during run-time, but its internal variables can easily escape simple static keyword matching systems. By embedding sensitive references within the curly brackets of formatted strings, an attacker forces evaluation at runtime without triggering static parser blocks.

Furthermore, static checks for specific string literals (such as globals or subclasses) are trivial to circumvent using dynamic key retrieval. If the validator permits calls to the built-in getattr() function, an attacker can dynamically piece together forbidden attribute strings through string concatenation. The AST analyzer only sees normal string variables and benign functions, missing the conversion of these inputs into restricted attribute calls.

Code Analysis and Parsing Flaws

To analyze this flaw, we can observe the difference between standard static checks and the dynamic bypass paths. In a vulnerable validator implementation, the checking function often matches attribute strings directly against a set of known forbidden attributes.

# Vulnerable logic representation
def validate_node(node):
    if isinstance(node, ast.Attribute):
        if node.attr in ['__globals__', '__subclasses__', '__builtins__']:
            raise SecurityError("Forbidden attribute accessed")

The code above fails to catch attempts where the restricted properties are retrieved indirectly. The following representation demonstrates how dynamic access circumvents the static filter entirely.

# Dynamic evasion pattern bypasses ast.Attribute check
class_ref = _get_data.__class__
# getattr accepts a constructed string which is not flagged as ast.Attribute
globals_dict = getattr(class_ref, '__glo' + 'bals__')

The fix introduced in n8n enforces robust AST validation paths that intercept dynamic attribute resolution and prohibit hazardous functions such as getattr when executed under the sandbox context. Additionally, nested structures in ast.JoinedStr are subject to strict recursive checking to ensure no execution boundaries are bypassed.

Exploitation Methodology

Exploitation of this vulnerability requires the attacker to possess authenticated access to an n8n instance with permissions to create or modify workflows. This requirement is standard for users with Owner or Member privileges on self-hosted deployments. The attack is entirely remote and does not require user interaction from other operators on the system.

The attacker begins by creating a workflow and inserting a Code node configured to execute Python. The attacker then writes a script designed to reconstruct forbidden attributes at runtime. The script leverages built-in objects like _get_data or _context which are automatically injected into the task context by n8n.

# Conceptual payload extracting system environment
def exploit():
    g_attr = "{0}{1}{0}".format("__", "globals")
    globals_dict = getattr(_get_data, g_attr)
    sys_module = globals_dict["sys"]
    os_module = sys_module.modules["os"]
    return [{"leak": dict(os_module.environ)}]
 
result = exploit()

The payload executes string manipulation to yield the target namespace. Once the attacker obtains the dictionary of globals, they extract the sys module, access the system modules cache, and retrieve the original os module. Finally, the payload extracts host environment variables and outputs them directly as a workflow result, allowing simple extraction via the n8n execution interface.

Impact Assessment

The impact of this security bypass is classified under unauthorized information disclosure. By gaining access to the root process namespace, an attacker defeats the execution isolation rules designed to restrict the task runner process. On self-hosted environments where environment access is configured, this escape allows the disclosure of sensitive host parameters.

In environments where the configuration flag N8N_BLOCK_RUNNER_ENV_ACCESS is set to true, the wrapper process executes logic to obscure the active environment variables. However, because the AST bypass provides direct access to the parent namespace and raw system module arrays, the attacker can traverse memory structures and recover sensitive configuration items. This bypass negates the protection provided by the isolation flag.

The disclosed information can contain database credentials, server API keys, connection strings, and third-party configuration details used by n8n. These secrets can then be used to pivot deeper into internal network environments. The CVSS score of 5.1 represents a medium severity impact due to the prerequisite of low-privilege authentication.

Remediation and Prevention

Remediating this vulnerability requires immediate updates to the underlying n8n deployment. Systems running versions prior to 2.25.7 must be upgraded directly to 2.25.7 or later. Deployments utilizing the 2.26.x branch must be updated to version 2.26.2 or subsequent releases to ensure all parser gaps are fully patched.

When direct upgrades are delayed due to operational requirements, administrators should apply environment controls to mitigate risk. Setting the environment variable NODES_EXCLUDE=["n8n-nodes-base.code"] disables the Code node globally, effectively removing the execution vector. Administrators can also restrict workflow creation privileges strictly to trusted security roles.

Finally, organizations should establish robust detection and log-hunting routines. Analyze workflow execution logs and inspect the n8n database for code structures containing obfuscated attribute lookups or unusual dynamic string functions. Monitor system executions to ensure the Python runner process does not spawn unexpected shell processes or engage in outbound external network traffic.

Technical Appendix

CVSS Score
5.1/ 10
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

Affected Systems

n8n (npm package)n8n self-hosted environments

Affected Versions Detail

Product
Affected Versions
Fixed Version
n8n
n8n-io
< 2.25.72.25.7
n8n
n8n-io
>= 2.26.0, < 2.26.22.26.2
AttributeDetail
CWE IDCWE-184 / CWE-265
Attack VectorNetwork (Low Privileges)
CVSS Score5.1 (Medium)
EPSS ScoreN/A (No CVE Assigned)
ImpactInformation Disclosure / Sandbox Escape
Exploit StatusProof-of-Concept
KEV StatusNot Listed

MITRE ATT&CK Mapping

T1190Exploit Public-Facing Application
Initial Access
T1211Exploitation for Defense Evasion
Defense Evasion
CWE-184
Incomplete List of Disallowed Input Values

The program checks input values against an incomplete list of disallowed values, allowing attackers to construct alternative representations that bypass filters.

Vulnerability Timeline

Patches merged into release branches 2.25.7 and 2.26.2
2026-06-10
GitHub Security Advisory GHSA-jwm3-qcfw-c5pp published
2026-06-16
OSV database entries updated
2026-06-16

References & Sources

  • [1]GitHub Security Advisory GHSA-jwm3-qcfw-c5pp
  • [2]n8n Main GitHub Repository
  • [3]GitHub Advisory Database Entry

Attack Flow Diagram

Press enter or space to select a node. You can then use the arrow keys to move the node around. Press delete to remove it and escape to cancel.
Press enter or space to select an edge. You can then press delete to remove it or escape to cancel.

More Reports

•1 day ago•CVE-2026-54068
5.9

CVE-2026-54068: Unauthenticated Server-Side Template Injection and SQLite Exfiltration in SiYuan PKM

An authentication bypass in the SiYuan personal knowledge management system before version 3.7.0 exposes a dynamic icon rendering endpoint. This endpoint processes client-supplied Go template directives. By submitting a crafted request, an unauthenticated remote attacker can leverage registered database template functions to execute arbitrary read-only SQL queries and exfiltrate workspace contents.

Amit Schendel
Amit Schendel
12 views•5 min read
•1 day ago•CVE-2026-54069
9.1

CVE-2026-54069: Authentication Bypass in SiYuan Note via Origin Header Spoofing

CVE-2026-54069 is a critical authentication bypass vulnerability in the SiYuan Note personal knowledge management system. The flaw is located in the HTTP server's middleware handling API authorization, which unconditionally trusts requests carrying a 'chrome-extension://' scheme in the Origin HTTP header, granting administrative access without validating API tokens.

Alon Barad
Alon Barad
10 views•5 min read
•2 days ago•CVE-2026-54089
9.1

CVE-2026-54089: Authentication Bypass by Spoofing in File Browser

CVE-2026-54089 is a critical authentication bypass vulnerability in File Browser affecting instances configured with proxy-based authentication. An unauthenticated remote attacker with direct network access can impersonate arbitrary users or register new accounts by spoofing configured HTTP headers.

Amit Schendel
Amit Schendel
8 views•7 min read
•2 days ago•GHSA-99J7-FHR2-XFJ4
10.0

GHSA-99J7-FHR2-XFJ4: Malicious Remote Code Execution Payload in 'exploration' Cargo Crate

The malicious Cargo package 'exploration' was uploaded to the crates.io registry. During compilation or package import, the crate executes code designed to establish an outbound TCP/HTTP connection, download an external second-stage binary, and execute the binary locally on the host machine. This creates an unauthenticated remote code execution vector impacting developer environments and continuous integration pipelines.

Amit Schendel
Amit Schendel
11 views•6 min read
•2 days ago•CVE-2026-54088
9.3

CVE-2026-54088: Pre-Authentication Remote Code Execution in File Browser Hook Authentication

CVE-2026-54088 is a critical command injection vulnerability in File Browser prior to version 2.63.6. When Hook Authentication is enabled, the application interpolates unsanitized credentials into a shell command, allowing unauthenticated remote code execution.

Alon Barad
Alon Barad
9 views•6 min read
•2 days ago•GHSA-QV4M-M73M-8HJ7
8.8

GHSA-qv4m-m73m-8hj7: Authenticated Arbitrary File Upload leading to Remote Code Execution in NotrinosERP

An authenticated remote code execution vulnerability exists in NotrinosERP (versions up to and including 1.0.0) within the Human Resource Management (HRM) module. Users with employee management permissions can upload arbitrary file types, including PHP scripts, which are written directly to a web-accessible directory. This allows for arbitrary code execution in the context of the web-server user.

Alon Barad
Alon Barad
8 views•6 min read