NewApp Monitoring is liveSign up free
AgentbeamBeta
AI agent vulnerability · n8n

CVE-2026-65598: n8n: Race Condition in Git Clone Node Allows Authenticated Users to Achieve Remote Code Execution

highCVSS 4.0 8.9GHSA-g3r5-9h93-4j2c

A race condition in the n8n Git node's clone operation lets an authenticated user get past its path restrictions and plant a repository in the community node directory. n8n loads it as a custom node on the next restart, which gives code execution on the server. Fixed in n8n 1.123.64, 2.29.8 and 2.30.1.

Published Jul 22, 2026 · Analysis Oct 25, 2026

What an attacker can do

The Git node's clone operation checks the target path, then clones. Between the check and the clone, an attacker swaps a directory for a symlink. This is a time-of-check to time-of-use race (CWE-367). The clone then lands in the community node directory instead of the allowed location.

n8n loads community nodes from that directory when it restarts. Nodes are JavaScript, so the planted repository runs as code inside the n8n process. The attacker needs an account that can create and run workflows with the Git node, plus a git repository they control that the instance can reach. The CVSS 4.0 vector marks attack complexity high, because the race must be won, and privileges low.

Both self-hosted and cloud instances are in scope. The result is arbitrary code execution as the n8n service. That exposes stored credentials, workflow data and anything the host can reach. The code runs after a restart, so it can be delayed. The advisory gives no proof of concept.

Who is affected

Affected: n8n below 1.123.64 on the 1.x line, 2.0.0-rc.0 up to but not including 2.29.8, and 2.30.0. Any instance where users other than fully trusted admins can build workflows that use the Git node is exposed.

Check the version:

npm ls n8n

For Docker, check the image tag or the version shown in the UI.

n8n

Ecosystem
npm
Affected
< 1.123.64
Fixed in
1.123.64
Check
npm ls n8n

n8n

Ecosystem
npm
Affected
>= 2.30.0, < 2.30.1
Fixed in
2.30.1
Check
npm ls n8n

n8n

Ecosystem
npm
Affected
>= 2.0.0-rc.0, < 2.29.8
Fixed in
2.29.8
Check
npm ls n8n

How to fix it

Upgrade to n8n 1.123.64, 2.29.8 or 2.30.1, or later. For an npm install, run npm install [email protected].

Temporary mitigations from the advisory, none of which fully remove the risk:

  • Restrict instance access to fully trusted users.
  • Add n8n-nodes-base.git to the NODES_EXCLUDE environment variable to disable the Git node.
  • Restrict network egress from the n8n instance so it cannot reach attacker-controlled git repositories.

How to tell if you were hit

Inspect the community node directory of your n8n install for packages or repositories you did not install, especially ones with recent timestamps. Review workflows and execution history for Git node clone operations that target unusual paths or untrusted repository URLs. Check egress logs for connections to unfamiliar git hosts. Look for unexpected restarts of the n8n process, since the planted code loads on restart. Any unknown custom node should be treated as a compromise of the host.

Original advisory

From the GitHub Advisory Database (CC BY 4.0).

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 NODES_EXCLUDE 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.

Questions

Does this need an authenticated account?

Yes. The attacker needs a user who can create and run workflows that use the Git node. The CVSS vector lists low privileges and no user interaction.

Why is a restart involved?

The crafted repository is placed in the community node directory. n8n only loads custom nodes from there when it starts, so the code runs after the next restart.

Can I block it without upgrading?

Partly. Adding n8n-nodes-base.git to NODES_EXCLUDE disables the Git node. The advisory says this and the other workarounds are short-term and do not fully remediate the risk.

Is it exploited in the wild?

The sources do not say so, and the entry is not in CISA's KEV catalog. EPSS is low at 0.0034.

References

How this page is made: the data panel comes from the GitHub Advisory Database, CISA’s KEV catalog, the NVD and FIRST EPSS, and updates twice a day. The analysis is written by an AI model from the sources listed above and checked by automated rules before it is published. Check versions against the vendor's advisory before you act. Methodology

More n8n vulnerabilities

All n8n entries