Executive brief
n8n is an open-source workflow automation platform used to build and run business processes. An authenticated user can exploit a timing vulnerability in the Git node's clone function to swap a directory for a symlink, allowing them to plant malicious code in the node directory. When n8n restarts, it automatically loads this malicious code as a custom node, resulting in arbitrary code execution on the server and complete compromise of both self-hosted and cloud instances.
Technical details
The vulnerability is a Time-of-Check-Time-of-Use (TOCTOU) race condition (CWE-367) in the Git node's clone operation. An authenticated attacker can bypass path validation by swapping a directory with a symlink between the time the path is validated and the time the clone operation executes. This allows the attacker to place a crafted Git repository in n8n's community node directory. Since n8n loads custom nodes and executes their JavaScript code at startup, the malicious code runs with server privileges. The attack requires network connectivity to reach the Git node, low privilege authentication to create and execute workflows, and precise timing to win the race condition. Patches are available in versions 1.123.64, 2.29.8, and 2.30.1 and later.
Affected products
- n8n n8n before 1.123.64, 2.29.8, and 2.30.1
Timeline
- 2026-07-08: disclosed
- 2026-07-22: advisory
- 2026-07-22: patched: Patches released in versions 1.123.64, 2.29.8, and 2.30.1