n8n Git Node runs code from repository hooks during commit
What this means
An attacker can run code inside n8n by putting a malicious hook in a Git repository. If your workflow clones that repository and then commits, the attacker's code runs. This could steal credentials stored in n8n, change workflows, or take over the system.
SecurityElites Manager Brief: the decision in one minute
| 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 or DevOps team managing n8n infrastructure. |
| Likely effort | About 30 minutes: update n8n to 1.113.0, set the environment variable, and restart. Longer if you run multiple n8n instances or use containers. |
Questions to ask your team or supplier
- Do we know which n8n workflows use the Git Node and which repositories they interact with? Are any of those repositories from external or untrusted sources?
- Have we checked our audit logs and system logs from the past few months for signs of unexpected code execution or Git Node activity?
- After upgrading and setting the environment variable, will we monitor Git Node operations to ensure the fix is working and to detect any future attempts?
Message you can forward to the owning team
Security notice: n8n Git Node runs code from repository hooks during commit (CVE-2025-62726)
Severity: High
SecurityElites Fix-First Score: 43 of 100
SecurityElites fix window: Within 30 days
Action: upgrade to n8n 1.113.0 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-2025-62726-n8n-git-node-runs-code-from-repository-hooks-during/
Source: SecurityElites AI Vulnerabilities Database, record SE-AIV-01849What is at stake in your AI setup
- API keys and credentials stored in n8n for connected services and AI providers could be exfiltrated by malicious code in a Git hook.
- Workflow definitions and logic could be modified or extracted by an attacker gaining code execution.
- Connected tools and systems (databases, APIs, AI endpoints) could be accessed or exploited by the attacker through the compromised n8n instance.
- Data processed through n8n, including prompts, model outputs, and training data, could be read or altered.
Who is exposed
- Teams running n8n workflows that clone repositories from outside sources
- Self-hosted n8n deployments that have not updated to version 1.113.0
- Any n8n instance where the Git Node is used without strict repository controls
- Workflows that commit to repositories as part of automation
Upgrades you need
| Software | Affected versions | Move to |
|---|---|---|
| n8n npm | Every version before 1.113.0 | 1.113.0 or later |
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 | Easy. It works reliably once the attacker can reach it |
| 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:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H
Kind of coding mistake
- CWE-829
If you cannot upgrade today
- Until you upgrade, do not use the Git Node to clone or interact with repositories from sources outside your organization.
- If the Git Node is used in production workflows, temporarily disable those workflows or restrict them to internal repositories you fully control.
- Review any recent Git Node operations against external repositories and check system logs for signs of unauthorized code execution.
Signs it may already have been used against you
- Review n8n audit logs for Git Node operations performed against external repositories before the upgrade date.
- Check system logs for unexpected child process execution or shell commands spawned by the n8n process.
- Look for failed or error messages in Git Node workflow executions, especially those involving cloned repositories.
- Search for unexpected changes to n8n workflows or credentials, particularly those that occurred after a Git Node operation.
Log searches to start from
Git Node activity in n8n logs (adapt field names to your environment)Splunk
index=n8n component=GitNode action=clone OR action=commit | stats count by repository, timestamp, statusUnexpected process execution tied to n8n (adapt field names to your environment)Elastic
process.parent.name:n8n AND process.executable:(/bin/sh OR /bin/bash OR /usr/bin/git) | sort @timestamp descWritten 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 where n8n is installedCheck whether you run n8n as a container, on a server, or as a cloud service. For self-hosted, note the installation path or container name. For cloud (n8n Cloud), you do not need to update manually.
- Check the current n8n versionOpen the n8n interface and go to Settings > About, or run `npm list n8n` in the directory where n8n is installed, or check the Docker image tag if you use containers.
- Review which workflows use the Git NodeIn the n8n interface, search for workflows containing a Git Node component. For each one, check whether it clones repositories from outside your organization or from untrusted sources.
- Upgrade n8n to version 1.113.0 or laterIf you use npm, run the upgrade command provided by your deployment guide. If you use Docker, pull the updated image with tag 1.113.0 or later. If you use n8n Cloud, the update is automatic.
- Set the environment variable to block Git hooksFor self-hosted deployments, add the environment variable `N8N_GIT_NODE_DISABLE_BARE_REPOS=true` before starting n8n. This prevents the Git Node from running hooks even if they exist in a cloned repository. See your deployment guide (Docker Compose, Kubernetes, or systemd) for where to set this.
- Restart n8nRestart the n8n service or container to apply the upgrade and environment variable. Verify that it starts without errors and shows the new version.
- Confirm the fix is activeOpen Settings > About in n8n and verify the version is 1.113.0 or later. For self-hosted, also confirm that the environment variable `N8N_GIT_NODE_DISABLE_BARE_REPOS` is set to `true` in your configuration.
- Review access logs for signs of prior exploitCheck n8n audit logs and system logs from before the upgrade for unexpected code execution, failed or unusual Git Node operations, or errors in workflows containing Git Nodes. Look for activities that do not match your team's normal workflow changes.
How to confirm it is fixed: Confirm that n8n is running version 1.113.0 or later (check Settings > About) and that the environment variable N8N_GIT_NODE_DISABLE_BARE_REPOS is set to true in self-hosted deployments.
SecurityElites Quick Fixes: copy and paste
Upgrade n8n with npmupgrade
npm install n8n@1.113.0
npm ls n8nCheck n8n version (npm)for this issue
npm list n8nSet environment variable for Docker Composefor this issue
environment:
- N8N_GIT_NODE_DISABLE_BARE_REPOS=trueCheck environment variable is set (bash)for this issue
echo $N8N_GIT_NODE_DISABLE_BARE_REPOSRun 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-2025-62726) 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 1.113.0 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 runs code from repository hooks during commit (CVE-2025-62726)
**Severity:** High | **SE Fix-First Score:** 43/100 | **Fix window:** Within 30 days
**Record:** SE-AIV-01849 https://securityelites.com/ai-vulnerabilities/cve-2025-62726-n8n-git-node-runs-code-from-repository-hooks-during/
### Why this matters
An attacker can run code inside n8n by putting a malicious hook in a Git repository. If your workflow clones that repository and then commits, the attacker's code runs. This could steal credentials stored in n8n, change workflows, or take over the system.
### What to do
1. Find where n8n is installed
2. Check the current n8n version
3. Review which workflows use the Git Node
4. Upgrade n8n to version 1.113.0 or later
5. Set the environment variable to block Git hooks
6. Restart n8n
7. Confirm the fix is active
8. Review access logs for signs of prior exploit
Full steps: https://securityelites.com/ai-vulnerabilities/cve-2025-62726-n8n-git-node-runs-code-from-repository-hooks-during/
### Done when
- [ ] n8n is at 1.113.0 or later everywhere it is installed
- [ ] Lock files, container images and CI configuration are updated
- [ ] Confirm that n8n is running version 1.113.0 or later (check Settings > About) and that the environment variable N8N_GIT_NODE_DISABLE_BARE_REPOS is set to true in self-hosted deployments.
- [ ] 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
- 30 Oct 2025: Made public
- 3 Dec 2026: Published
Official record
### Impact A remote code execution vulnerability exists in the Git Node component available in both Cloud and Self-Hosted versions of n8n. When a malicious actor clones a remote repository containing a pre-commit hook, the subsequent use of the Commit operation in the Git Node can inadvertently trigger the hook’s execution.This allows attackers to execute arbitrary code within the n8n environment, potentially compromising the system and any connected credentials or workflows.All users with workflows that utilize the Git Node to clone untrusted repositories are affected.### Patches The vulnerability was addressed in v1.113.0 (n8n-io/n8n#19559), which introduces a new environment variable: `N8N_GIT_NODE_DISABLE_BARE_REPOS`. For self-hosted deployments, it is strongly recommended to set this variable to `true` to mitigate the risk of executing malicious Git hooks.### Workarounds To reduce risk prior to upgrading:- Avoid cloning or interacting with untrusted repositories using the Git Node. - Disable or restrict the use of the Git Node in workflows where repository content cannot be fully trusted.
Weakness type: CWE-829
Use this record in your own tools
Get this record as JSON
curl https://securityelites.com/wp-json/se-aivd/v1/vulns/CVE-2025-62726For 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.