Skip to main content
CVE Vulnerability Database
Vulnerability Database/CVE-2026-71539

CVE-2026-71539: n8n Workflow Automation RCE Vulnerability

CVE-2026-71539 is a remote code execution flaw in n8n workflow automation that allows authenticated users to execute arbitrary code via Git node exploitation. This article covers technical details, affected versions, and mitigation.

Published:

CVE-2026-71539 Overview

CVE-2026-71539 is a time-of-check to time-of-use (TOCTOU) race condition in n8n, an open source workflow automation platform. The flaw resides in the Git node clone operation. An authenticated workflow user can swap a validated directory for a symbolic link after validation but before the clone completes. This lets the attacker plant a crafted repository inside the community node directory. On restart, n8n loads the planted repository as a custom JavaScript node and executes arbitrary code on the server. Maintainers fixed the issue in versions 1.123.64, 2.29.8, and 2.30.1.

Critical Impact

An authenticated workflow user can achieve arbitrary code execution on the n8n host by racing the Git clone path validation with a symlink swap.

Affected Products

  • n8n versions prior to 1.123.64
  • n8n versions prior to 2.29.8
  • n8n versions prior to 2.30.1

Discovery Timeline

  • 2026-08-18 - CVE-2026-71539 published to NVD
  • 2026-08-19 - Last updated in NVD database

Technical Details for CVE-2026-71539

Vulnerability Analysis

The vulnerability is a classic TOCTOU race [CWE-367] in the Git node clone workflow. n8n validates the clone destination as a legitimate directory, then invokes the clone operation. Between the validation step and the actual filesystem write, an authenticated user can replace the validated path with a symbolic link that points into the community node directory. Git clone then writes the attacker-controlled repository through the symlink into a directory that n8n treats as a trusted source of custom JavaScript nodes. After the next restart, n8n loads the planted node module and executes its JavaScript in the server process context, giving the attacker code execution with the privileges of the n8n runtime.

Root Cause

The root cause is non-atomic path handling. The check (directory validation) and the use (repository clone into that path) happen as separate operations without holding a filesystem lock or resolving the final path through a symlink-safe primitive. An attacker who controls a concurrent workflow can win this race window and substitute a symlink between the two calls. Community node loading amplifies the impact because n8n executes JavaScript from that directory at startup without additional signing or provenance checks.

Attack Vector

Exploitation requires an authenticated user with permission to configure and run a Git node workflow. The attacker triggers a clone against a directory they can influence, then races a second process or workflow that replaces the target with a symlink to the community node directory. Once the crafted repository lands in that directory, the attacker or a scheduled restart loads the payload. See the GitHub Security Advisory GHSA-g3r5-9h93-4j2c for technical details.

Detection Methods for CVE-2026-71539

Indicators of Compromise

  • Unexpected symbolic links appearing under n8n workflow working directories or the community node directory (typically ~/.n8n/nodes or the configured N8N_CUSTOM_EXTENSIONS path).
  • New or modified package.json files and .js node modules inside the community node directory that were not installed through the standard community node manager.
  • Git node executions immediately followed by filesystem changes outside the intended clone target.
  • n8n process spawning unexpected child processes (shells, network utilities, package managers) shortly after service restart.

Detection Strategies

  • Monitor filesystem events on the community node directory for creation of symlinks and for writes not originating from the n8n community node install workflow.
  • Correlate Git node execution audit logs with subsequent file writes outside the expected clone destination.
  • Baseline the contents of the community node directory and alert on deviations after each restart.

Monitoring Recommendations

  • Enable auditd or eBPF-based file integrity monitoring on ~/.n8n/nodes and any custom extensions path.
  • Log and review all Git node clone operations, including source URL, destination path, and invoking user.
  • Alert on n8n service restarts that are followed by loading of new custom node modules.

How to Mitigate CVE-2026-71539

Immediate Actions Required

  • Upgrade to n8n 1.123.64, 2.29.8, or 2.30.1 depending on your release track.
  • Audit the community node directory for unauthorized .js files, package.json entries, or symbolic links and remove any that were not installed through approved channels.
  • Restrict workflow authoring and Git node usage to trusted users until patched.
  • Rotate any credentials, tokens, or secrets that were accessible to the n8n runtime if compromise is suspected.

Patch Information

The issue is fixed in n8n 1.123.64, 2.29.8, and 2.30.1. The fix eliminates the TOCTOU window in the Git node clone path.

Workarounds

  • Disable the Git node for non-administrative users until the upgrade is applied.
  • Set the community node directory to read-only for the n8n runtime user, or disable community node loading via N8N_COMMUNITY_PACKAGES_ENABLED=false.
  • Run n8n under a dedicated low-privilege service account with no write access outside its data directory.
bash
# Configuration example: disable community nodes and restart n8n
export N8N_COMMUNITY_PACKAGES_ENABLED=false
systemctl restart n8n

Disclaimer: This content was generated using AI. While we strive for accuracy, please verify critical information with official sources.

Default Legacy - Prefooter | Experience the World’s Most Advanced Cybersecurity Platform

Experience the Most Advanced Cybersecurity Platform

See how the world’s most intelligent, autonomous cybersecurity platform can protect your organization today and into the future.