n8n Git node can read files outside its sandbox

HighSE Fix-First Score 43/100CVE-2026-72770SE-AIV-01771Reading or writing files it should notAI softwareMade public 23 Jul 2026

Download as PDF

What this means

An authenticated user with permission to create or run workflows can read any git repository and its history on the server where n8n runs. This includes source code, secrets stored in git history, and other sensitive files. The attacker needs valid n8n login credentials and workflow creation rights.

SecurityElites Manager Brief: the decision in one minute

A person with n8n login access can read files and git history from anywhere on the server, not just the intended safe folders. You need to upgrade n8n to close this gap.

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 or infrastructure team that runs n8n.
Likely effortAbout 15 minutes: download and deploy the fixed n8n version, then restart the service. Longer if you need to coordinate with teams that use n8n workflows.

Questions to ask your team or supplier

  • Who has permission to create and execute workflows in our n8n instance, and do all of them need that level of access?
  • Do any of our workflows use the Git node to fetch, pull, or access git repositories? If so, what repositories and are they all intended to be accessible?

Message you can forward to the owning team

Security notice: n8n Git node can read files outside its sandbox (CVE-2026-72770)

Severity: High
SecurityElites Fix-First Score: 43 of 100
SecurityElites fix window: Within 30 days
Action: upgrade to n8n 2.32.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-72770-n8n-git-node-can-read-files-outside-its-sandbox/
Source: SecurityElites AI Vulnerabilities Database, record SE-AIV-01771

What is at stake in your AI setup

  • Tools and systems the n8n agent is connected to: an attacker could read git history to discover API keys, database credentials, or integration tokens stored in source code.
  • Training or retrieval data: if workflows pull data from git repositories for processing, an attacker could access that data before n8n uses it.
  • Prompts and chat history: if workflows store prompts or chat histories in git repositories, those could be read and exposed.

Map where your company uses AI

Who is exposed

  • n8n instances running version 1.123.66 or earlier, or 2.31.4 or earlier, or 2.32.0.
  • Teams where authenticated users can create or execute workflows.
  • Servers where n8n can access git repositories outside its intended workspace folder.
  • Any git repository on the same server as n8n, especially those holding secrets or source code.

Upgrades you need

SoftwareAffected versionsMove to
n8n
npm
Every version before 1.123.67; 2.32.0 up to, but not including, 2.32.1; 2.0.0-rc.0 up to, but not including, 2.31.52.32.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.67, 2.31.5, 2.32.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 doEasy. It works reliably once the attacker can reach it
Risk of: data being readHigh
Risk of: data or settings being changedNone
Risk of: the service being taken downNone
Can attackers automate it at scaleNo, according to CISA. Each target needs manual work
How much control an attacker gainsPartial control, according to CISA

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

Kind of coding mistake

  • CWE-22: file paths can escape the allowed folder

If you cannot upgrade today

  • Restrict n8n access to fully trusted users only until you can upgrade; remove workflow create rights from less-trusted users.
  • Disable the Git node entirely by setting the environment variable `NODES_EXCLUDE=n8n-nodes-base.git` and restarting n8n. This stops all Git node usage until you upgrade.
  • These are temporary steps only and do not fully fix the problem. Upgrade as soon as possible.

Signs it may already have been used against you

  • Search n8n audit logs for Git node executions by users with workflow create rights.
  • Look for Git node operations (fetch, pull, push-tags) that reference local file paths or paths starting with `file://` instead of remote URLs.
  • Check server git repository access logs for unexpected clones or pulls initiated by the n8n process around the time the vulnerability existed.
  • Review n8n workflow definitions for any that use the Git node with repository paths outside the intended workspace folder.

Log searches to start from

Git node executions accessing local paths (adapt field names to your logs)Splunk

source="n8n" node="Git" AND (operation="fetch" OR operation="pull" OR operation="push-tags") AND (repository="file://" OR repository="/")

Git node executions accessing local paths (adapt field names to your logs)Elastic

node:Git AND (operation:(fetch OR pull OR push-tags)) AND repository.path:(/)

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 where n8n is installed and what version runs nowLog into your n8n instance and go to Settings > About to find the version number. Write it down. Also note where n8n is installed on your server (for example, `/opt/n8n` or via Docker container).
  2. Check if your version is affectedIf you run version 1.123.66 or earlier, or 2.31.4 or earlier, or exactly 2.32.0, you are affected. All other versions are safe.
  3. Review who has workflow create and execute rightsList the n8n users and groups that have permission to create new workflows or execute existing ones. These users could exploit this vulnerability.
  4. Check for Git node usage in workflowsSearch your n8n instance for any workflows that use the Git node with fetch, pull, or push-tags operations. Note which workflows use these features and who can run them.
  5. Upgrade n8n to a fixed versionIf you run version 1.x, upgrade to 1.123.67 or later. If you run version 2.31.x or 2.32.0, upgrade to 2.31.5 or 2.32.1 respectively. Follow your n8n deployment method (npm, Docker, or managed service) to perform the upgrade.
  6. Restart n8n and verify it starts cleanlyAfter upgrade, restart the n8n service. Wait for it to fully start and confirm you can log in and access a workflow without errors.
  7. Confirm the fix by checking the installed versionLog back into n8n and go to Settings > About to verify the version is now 1.123.67, 2.31.5, 2.32.1 or later.
  8. Review access logs for signs of exploitation before the fixSearch n8n logs and audit records for any Git node executions that accessed paths outside the workspace folder between when the vulnerability existed and now. Look for fetch, pull, or push-tags operations that targeted local file paths instead of remote URLs.

How to confirm it is fixed: Confirm that your n8n version is now 1.123.67, 2.31.5, 2.32.1 or later by checking Settings > About in the n8n web interface.

SecurityElites Quick Fixes: copy and paste

Upgrade n8n with npmupgrade

npm install n8n@2.32.1
npm ls n8n

Check n8n version via npm (if installed via npm)for this issue

npm list n8n

Check n8n version via Docker (if running in container)for this issue

docker exec <container_name> n8n --version

Keep file access inside one directory (Python)general hardening

from pathlib import Path

BASE = Path("/srv/app/data").resolve()

def safe_path(name: str) -> Path:
    p = (BASE / name).resolve()
    if not p.is_relative_to(BASE):
        raise ValueError("path outside allowed directory")
    return p

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-72770) 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.32.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 versions of n8n are affected by this vulnerability?A good answer: Versions 1.123.66 and earlier, 2.31.4 and earlier, and exactly 2.32.0.
What type of user can exploit this vulnerability?A good answer: An authenticated n8n user who has permission to create or execute workflows.
What can an attacker read if they exploit this?A good answer: Any git repository and its history that exists on the same server as n8n, including source code, secrets, and configuration files.
What is the first step if we cannot upgrade n8n immediately?A good answer: Restrict n8n access to only fully trusted users and optionally disable the Git node using the NODES_EXCLUDE environment variable.

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 can read files outside its sandbox (CVE-2026-72770)

**Severity:** High  |  **SE Fix-First Score:** 43/100  |  **Fix window:** Within 30 days
**Record:** SE-AIV-01771 https://securityelites.com/ai-vulnerabilities/cve-2026-72770-n8n-git-node-can-read-files-outside-its-sandbox/

### Why this matters
An authenticated user with permission to create or run workflows can read any git repository and its history on the server where n8n runs. This includes source code, secrets stored in git history, and other sensitive files. The attacker needs valid n8n login credentials and workflow creation rights.

### What to do
1. Find where n8n is installed and what version runs now
2. Check if your version is affected
3. Review who has workflow create and execute rights
4. Check for Git node usage in workflows
5. Upgrade n8n to a fixed version
6. Restart n8n and verify it starts cleanly
7. Confirm the fix by checking the installed version
8. Review access logs for signs of exploitation before the fix

Full steps: https://securityelites.com/ai-vulnerabilities/cve-2026-72770-n8n-git-node-can-read-files-outside-its-sandbox/

### Done when
- [ ] n8n is at 2.32.1 or later everywhere it is installed
- [ ] Lock files, container images and CI configuration are updated
- [ ] Confirm that your n8n version is now 1.123.67, 2.31.5, 2.32.1 or later by checking Settings > About in the n8n web interface.
- [ ] 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

## ImpactAuthenticated n8n users with workflow create/execute rights could use the Git node's fetch, pull, or push-tags operations to bypass the repository-path containment checks that already protected clone and push. By pointing an allowlisted remote configuration value at a local path outside the intended sandbox, an attacker could pull an arbitrary local git repository into the workspace and subsequently read its files and history.## PatchesThe issue has been fixed in n8n versions 1.123.67, 2.31.5, and 2.32.1. Users should upgrade to one of these versions or later to remediate the vulnerability.## WorkaroundsIf 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.These workarounds do not fully remediate the risk and should only be used as short-term mitigation measures.

Weakness type: CWE-22

Use this record in your own tools

Get this record as JSON

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

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 2 Dec 2026. Read the vendor advisory before changing a production system.