n8n Git node lets authenticated users run code on the server
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 Score | 43 of 100 Our own ranking of what to fix first. Real attacks count most, then the chance of attack, then severity. |
|---|---|
| SecurityElites fix window | Within 30 days High severity. This is our suggestion from common practice; your own policy comes first. |
| Who should own the fix | Platform engineering or DevOps team managing n8n instances. |
| Likely effort | About 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-01770What 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.
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
| Software | Affected versions | Move 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.8 | 2.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 attacked | No known attacks and no public attack code when CISA last reviewed it |
|---|---|
| Where the attacker must be | Anywhere that can reach it over a network, including the internet if it is exposed |
| Account needed | An ordinary user account |
| Does a person have to do something | No. It works without anyone clicking or opening anything |
| How hard it is to do | Hard. It depends on conditions the attacker does not control |
| Risk of: data being read | High |
| Risk of: data or settings being changed | High |
| Risk of: the service being taken down | High |
| Can attackers automate it at scale | No, according to CISA. Each target needs manual work |
| How much control an attacker gains | Total 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_idUnusual 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, timestampWritten 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
- 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.
- 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).
- 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.
- 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.
- Restart the n8n serviceAfter the upgrade completes, restart the n8n process or container. Verify that the service is running and accessible.
- 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.
- 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.
- 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 n8nRun 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_IMAGETest 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.
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.
Related vulnerabilities
In the same software
- n8n legacy expression engine allows code execution via JSON.stringify override High · CVE-2026-86083
- n8n OpenAI node bypasses domain restrictions on model search High · CVE-2026-86082
- n8n Git node can freeze the instance with a crafted path High · CVE-2026-86081
- n8n OAuth registration accepts unlimited field sizes, filling the database High · CVE-2026-86075
- n8n expression compiler can run arbitrary code through class field names High · CVE-2026-86076
- n8n Edit Fields node can crash the whole instance with a bad field name High · CVE-2026-72749
The same kind of mistake in other AI tools
- Langflow OSS allows arbitrary code execution through tool listing without admin check High · CVE-2026-128876
- Langflow OSS can run arbitrary code via tool-call interface before admin check High · CVE-2026-128867
- Langflow OSS allows remote code execution through improper code handling High · CVE-2026-127065
- Langflow OSS allows authenticated users to run arbitrary code High · CVE-2026-122088
- Langflow OSS allows authenticated users to run any command on the server High · CVE-2026-120601
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-65598For 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.