n8n Git node lets authenticated users run code on the server

HighSE Fix-First Score 43/100CVE-2026-65598SE-AIV-01770Remote code executionAI softwareMade public 22 Jul 2026

Download as PDF

What this means

An authenticated user can run arbitrary code on the n8n server by creating a workflow that exploits a race condition in the Git node. This gives the attacker the same access and permissions as the n8n process itself, potentially compromising all workflows, credentials, and data stored in the instance.

SecurityElites Manager Brief: the decision in one minute

A flaw in n8n's Git node allows any authenticated user to execute code on your server. If your n8n instance is used by people you do not fully trust, this is a critical risk. You must upgrade immediately or disable the Git node.

SecurityElites Fix-First Score43 of 100
Our own ranking of what to fix first. Real attacks count most, then the chance of attack, then severity.
SecurityElites fix windowWithin 30 days
High severity. This is our suggestion from common practice; your own policy comes first.
Who should own the fixPlatform engineering or DevOps team managing n8n instances.
Likely effortAbout 15 minutes per instance: check the version, upgrade to the patched version, and restart. Disabling the Git node takes 5 minutes if upgrade is not possible. The upgrade is straightforward unless you have custom node configurations that depend on the Git n

Questions to ask your team or supplier

  • Who has authenticated access to our n8n instances, and do we trust all of them to create and run workflows?
  • Do we currently use the Git node in any production workflows, and what repositories does it clone from?
  • If we cannot upgrade immediately, is it acceptable to disable the Git node for the next few days, or do we have critical workflows that depend on it?

Message you can forward to the owning team

Security notice: n8n Git node lets authenticated users run code on the server (CVE-2026-65598)

Severity: High
SecurityElites Fix-First Score: 43 of 100
SecurityElites fix window: Within 30 days
Action: upgrade to n8n 2.30.1 or later.
What we need from you: confirm whether we run this software, who owns it, and the date it will be fixed.
Full guide: https://securityelites.com/ai-vulnerabilities/cve-2026-65598-n8n-git-node-lets-authenticated-users-run-code-on/
Source: SecurityElites AI Vulnerabilities Database, record SE-AIV-01770

What is at stake in your AI setup

  • Credentials and API keys stored in n8n (such as LLM provider keys, database credentials) could be exposed or exfiltrated by malicious code run via the compromised Git node.
  • Custom nodes and tools connected to AI agents or workflows could be replaced or modified to send data to an attacker or perform unintended actions.
  • Prompts, chat history, and training data used in n8n workflows could be read or modified by code executed through the vulnerability.

Map where your company uses AI

Who is exposed

  • n8n instances (self-hosted or cloud) with untrusted or semi-trusted authenticated users who can create workflows.
  • Teams sharing a single n8n instance across departments or external partners.
  • n8n instances in multi-tenant setups where user isolation is a concern.
  • Instances with the Git node enabled and no network restrictions in place.

Upgrades you need

SoftwareAffected versionsMove to
n8n
npm
Every version before 1.123.64; 2.30.0 up to, but not including, 2.30.1; 2.0.0-rc.0 up to, but not including, 2.29.82.30.1 or later

Each maintained branch has its own fixed version. Stay on your branch if you cannot jump to the newest: n8n 1.123.64, 2.29.8, 2.30.1.

Am I affected?

Enter the version you run. Nothing you type is stored.

SecurityElites Developer Brief: the technical picture

Is it being attackedNo known attacks and no public attack code when CISA last reviewed it
Where the attacker must beAnywhere that can reach it over a network, including the internet if it is exposed
Account neededAn ordinary user account
Does a person have to do somethingNo. It works without anyone clicking or opening anything
How hard it is to doHard. It depends on conditions the attacker does not control
Risk of: data being readHigh
Risk of: data or settings being changedHigh
Risk of: the service being taken downHigh
Can attackers automate it at scaleNo, according to CISA. Each target needs manual work
How much control an attacker gainsTotal control of the affected software, according to CISA

Read from the official severity rating: CVSS:4.0/AV:N/AC:H/AT:P/PR:L/UI:N/VC:H/VI:H/VA:H/SC:H/SI:L/SA:L

Kind of coding mistake

  • CWE-367

If you cannot upgrade today

  • Restrict access to the n8n instance to fully trusted users only. Remove or disable accounts for external users, contractors, or partners until the upgrade is complete.
  • Disable the Git node by setting the environment variable `NODES_EXCLUDE=n8n-nodes-base.git` and restarting the n8n service. This prevents the vulnerability from being exploited while you plan the upgrade.
  • Restrict network egress from the n8n server to prevent it from connecting to external or attacker-controlled git repositories. These mitigations reduce but do not eliminate the risk.

Signs it may already have been used against you

  • Review n8n workflow execution logs for any use of the Git node by authenticated users, especially with unusual repository URLs or paths.
  • Check the community node directory (typically `.n8n/nodes/`) for recently added or modified files, particularly any new `.js` or `.node.js` files that were not installed through the n8n package manager.
  • Look for failed Git clone operations or error messages in n8n logs that mention permission denied, symlink, or path validation errors.
  • Monitor system-level logs for child processes spawned by the n8n service with unexpected commands or access to the node directory.

Log searches to start from

Git node execution by userSplunk

source="n8n logs" ("git" OR "Git node") AND ("execute" OR "workflow") | stats count by user, timestamp, workflow_id

Unusual file writes to n8n node directoryElastic

process.name:n8n AND file.path:*/.n8n/nodes/* AND event.action:(created OR modified) | stats count by file.name, file.path, timestamp

Written with AI as a starting point. Review them and change the index and field names to match your own logs before you rely on the result.

SecurityElites Fix Guide: step by step

  1. Find all n8n instances in your environmentList every machine, container, or cloud deployment running n8n. Record the hostname or ID and the current version of n8n running on each.
  2. Check the version of each instanceLog in to each n8n instance and check the version in the settings or admin panel. Compare against the affected ranges: before 1.123.64, 2.30.0 to 2.30.0 (not including 2.30.1), and 2.0.0-rc.0 to 2.29.7 (not including 2.29.8).
  3. Assess who can create workflowsIdentify all authenticated users on each affected instance. Determine which are fully trusted (such as only your own team) and which are not (such as customers, partners, or external teams). Instances with only fully trusted users are lower risk.
  4. Upgrade to the patched versionFor each affected instance, upgrade to version 1.123.64, 2.29.8, or 2.30.1 or later, depending on the major version currently running. Follow the official n8n upgrade documentation for your deployment type.
  5. Restart the n8n serviceAfter the upgrade completes, restart the n8n process or container. Verify that the service is running and accessible.
  6. Confirm the fixLog in to each upgraded instance and confirm in the settings or admin panel that the version is now 1.123.64, 2.29.8, 2.30.1, or later.
  7. Review workflow history for suspicious Git node activityCheck the workflow execution logs on each instance for any use of the Git node by authenticated users. Look for unexpected repositories, paths, or error messages that may indicate an exploitation attempt before the upgrade.
  8. If upgrade is not immediately possible, disable the Git nodeSet the environment variable `NODES_EXCLUDE=n8n-nodes-base.git` and restart the n8n process. This removes the Git node from the user interface and prevents its use until the instance is upgraded.

How to confirm it is fixed: Log in to each upgraded n8n instance and confirm in the settings or admin panel that the version is 1.123.64, 2.29.8, 2.30.1, or later.

SecurityElites Quick Fixes: copy and paste

Upgrade n8n with npmupgrade

npm install n8n@2.30.1
npm ls n8n

Run the service in a locked-down containergeneral hardening

docker run --read-only --cap-drop ALL \
  --security-opt no-new-privileges --user 1000:1000 \
  -p 127.0.0.1:8080:8080 YOUR_IMAGE

Test in a non-production environment first. General hardening examples use placeholder names and ports; change them to match your setup.

Let your AI coding assistant do the upgrade

Paste this into the coding assistant you already use, inside the project. It checks first and asks before it changes anything.

Instruction for your coding assistant

You are helping me fix a security vulnerability (CVE-2026-65598) in this project.\n\n1. Search the whole repository, including lock files, container files and CI configuration, for these packages and list every place they are pinned or installed:\n   - n8n (npm): must be 2.30.1 or later
2. Tell me which version we use now and whether it is affected. Stop and ask me before changing anything.
3. After I agree, raise each one to the safe version, update the lock files, and keep every other dependency as it is.
4. Run the tests and tell me what failed.
5. Give me a short summary of the files you changed that I can put in the pull request.

SecurityElites Incident Drill: could your team handle this?

Four questions to ask in your next team meeting. If any has no clear answer, that is the gap to close.

What is the race condition in this vulnerability, and why does it allow code execution?A good answer: The Git node checks that a path is safe before cloning, but an attacker can swap a directory for a symlink between the check and the clone, causing the clone to write outside the intended location. The cloned code then loads as a custom nod
Which versions of n8n are affected?A good answer: Versions before 1.123.64, versions 2.30.0 to 2.30.0, and versions 2.0.0-rc.0 to 2.29.7 are affected; fixed versions are 1.123.64, 2.29.8, and 2.30.1 or later.
What is the minimum access level an attacker needs to exploit this?A good answer: An authenticated user account on the n8n instance with permission to create and run workflows is sufficient.
What is the first step if we cannot upgrade our instance immediately?A good answer: Disable the Git node by setting the environment variable `NODES_EXCLUDE=n8n-nodes-base.git` and restarting the service, and restrict access to fully trusted users only.

Run a full timed drill with your team

Ticket for your backlog

Paste into Jira, GitHub Issues or any tracker that reads Markdown.

Ready-made ticket

## n8n Git node lets authenticated users run code on the server (CVE-2026-65598)

**Severity:** High  |  **SE Fix-First Score:** 43/100  |  **Fix window:** Within 30 days
**Record:** SE-AIV-01770 https://securityelites.com/ai-vulnerabilities/cve-2026-65598-n8n-git-node-lets-authenticated-users-run-code-on/

### Why this matters
An authenticated user can run arbitrary code on the n8n server by creating a workflow that exploits a race condition in the Git node. This gives the attacker the same access and permissions as the n8n process itself, potentially compromising all workflows, credentials, and data stored in the instance.

### What to do
1. Find all n8n instances in your environment
2. Check the version of each instance
3. Assess who can create workflows
4. Upgrade to the patched version
5. Restart the n8n service
6. Confirm the fix
7. Review workflow history for suspicious Git node activity
8. If upgrade is not immediately possible, disable the Git node

Full steps: https://securityelites.com/ai-vulnerabilities/cve-2026-65598-n8n-git-node-lets-authenticated-users-run-code-on/

### Done when
- [ ] n8n is at 2.30.1 or later everywhere it is installed
- [ ] Lock files, container images and CI configuration are updated
- [ ] Log in to each upgraded n8n instance and confirm in the settings or admin panel that the version is 1.123.64, 2.29.8, 2.30.1, or later.
- [ ] Logs were checked for signs of earlier use

SecurityElites Fix Tracker

Record who owns this fix, the date it is due and when it is done, and see everything still open in one list. Free with a SecurityElites account.

Sign in to track this fix

Change history

  • 22 Jul 2026: Made public
  • 2 Dec 2026: Published

Official record

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

Weakness type: CWE-367

Use this record in your own tools

Get this record as JSON

curl https://securityelites.com/wp-json/se-aivd/v1/vulns/CVE-2026-65598

For scanners and pipelines: OSV format · CycloneDX format · API guide · Email alerts · Fix tracker

The plain-language sections were written with AI from the official record, and the upgrade versions come directly from the official data. Last updated 3 Dec 2026. Read the vendor advisory before changing a production system.