CVE-2026-65598: n8n before 1.123.64 Remote Code Execution via Git Clone
Impact A TOCTOU race condition in the Git node's clone operation lets an authenticated user bypass its path restrictions by swapping a directory for a symlink after the path is validated but before the clone runs. This plants a crafted repository in the community node directory, which n8n loads as a custom node on the next restart, and since nodes execute JavaScript, this yields arbitrary code execution on the server.
Both self-hosted and cloud instances are affected, where authenticated users can create and run workflows using the Git node.
Patches Users should upgrade to the patched version once available to remediate the vulnerability.
Workarounds If upgrading is not immediately possible, administrators should consider the following temporary mitigations: - Restrict n8n instance access to fully trusted users only. - Disable the Git node by adding n8n-nodes-base.git to the NODESEXCLUDE environment variable. - Restrict network egress from the n8n instance to prevent connections to attacker-controlled git repositories.
These workarounds do not fully remediate the risk and should only be used as short-term mitigation measures.
Other sources
n8n before 1.123.64, 2.29.8, and 2.30.1 contains a TOCTOU race condition in the Git node's clone operation that allows authenticated users to bypass path restrictions by swapping a directory for a symlink after the path is validated but before the clone runs. This lets an attacker plant a crafted repository in the community node directory, which n8n loads as a custom node on the next restart, executing arbitrary JavaScript on the server. Both self-hosted and cloud instances are affected.
— MITRE
Affected Software
Remediation
Recommended actions to resolve this vulnerability, in priority order.
- Upgrade
Upgrade
npm/n8nto a version that resolves this vulnerability.Fixed in 2.29.8 - Upgrade
Upgrade
npm/n8nto a version that resolves this vulnerability.Fixed in 2.30.1 - Upgrade
Upgrade
npm/n8nto a version that resolves this vulnerability.Fixed in 1.123.64 - Upgrade
Upgrade
n8nto a version that resolves this vulnerability.Fixed in 1.123.64 - Upgrade
Upgrade
n8nto a version that resolves this vulnerability.Fixed in 2.29.8 - Upgrade
Upgrade
n8nto a version that resolves this vulnerability.Fixed in 2.30.1 - Configuration
Temporarily mitigate by disabling the Git node: add `n8n-nodes-base.git` to the `NODES_EXCLUDE` environment variable.
n8n NODES_EXCLUDE = n8n-nodes-base.git - Compensating control
Temporarily mitigate by restricting n8n instance access to fully trusted users only.
- Compensating control
Temporarily mitigate by restricting network egress from the n8n instance to prevent connections to attacker-controlled git repositories.
Event History
Frequently Asked Questions
What is the severity of CVE-2026-65598?
CVE-2026-65598 has a severity rating of high, with a CVSS score of 8.9.
How does CVE-2026-65598 affect n8n?
CVE-2026-65598 allows an authenticated user to exploit a TOCTOU race condition during the Git clone operation, leading to remote code execution.
What is a key risk of CVE-2026-65598?
The key risk of CVE-2026-65598 is that it enables attackers to bypass path restrictions and execute malicious code in the n8n community node directory.
How can I fix CVE-2026-65598?
To fix CVE-2026-65598, upgrade n8n to version 1.123.64 or later, where the vulnerability is addressed.
Who can be affected by CVE-2026-65598?
Any authenticated user of n8n versions prior to 1.123.64 may be affected by CVE-2026-65598.