n8n Git node allows arbitrary commands through Git hooks
What this means
An attacker who can create or change an n8n workflow can run any command on the server where n8n runs. This means they could read files, delete data, install malware, or take over the entire server and everything it connects to.
SecurityElites Manager Brief: the decision in one minute
The n8n Git node has a critical flaw that lets anyone who can build a workflow run commands as the n8n user. This needs an urgent upgrade to version 1.119.2 or later, or the Git node must be blocked until you can upgrade.
| SecurityElites Fix-First Score | 51 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 7 days Critical severity. This is our suggestion from common practice; your own policy comes first. |
| Who should own the fix | Platform or infrastructure team responsible for n8n deployments. |
| Likely effort | About 15 minutes: download and deploy version 1.119.2 and restart n8n. This could take longer if you have custom Git workflows that need testing after the upgrade, or if you must coordinate upgrades across multiple n8n instances. |
Questions to ask your team or supplier
- Which team members have permission to create and edit n8n workflows, and are they all trusted?
- Do we use the Git node in any active workflows, and if so, do we clone from untrusted repositories?
- What external systems, APIs, and databases can n8n access with its current credentials, and what would an attacker be able to do if they gained command execution on the n8n server?
Message you can forward to the owning team
Security notice: n8n Git node allows arbitrary commands through Git hooks (CVE-2025-65964)
Severity: Critical
SecurityElites Fix-First Score: 51 of 100
SecurityElites fix window: Within 7 days
Action: upgrade to n8n 1.119.2 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-65964-n8n-git-node-allows-arbitrary-commands-through-git-hooks/
Source: SecurityElites AI Vulnerabilities Database, record SE-AIV-01843What is at stake in your AI setup
- API keys and credentials stored in n8n, which an attacker could extract and use to access external AI services or other APIs.
- n8n execution history and logs, which may contain sensitive prompts, chat content, or data processed by workflows.
- Connected tools and integrations, which an attacker could use to query databases, modify files, or pivot to other systems.
Who is exposed
- Any team member who can create or edit n8n workflows, if they have access to the Git node.
- Any n8n instance running version 0.123.1 through 1.119.1 (inclusive) with the Git node enabled.
- Setups where n8n has credentials or SSH keys to clone repositories.
- Teams using n8n to interact with any Git repositories, trusted or not.
Upgrades you need
| Software | Affected versions | Move to |
|---|---|---|
| n8n npm | 0.123.1 up to, but not including, 1.119.2 | 1.119.2 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:4.0/AV:N/AC:L/AT:N/PR:L/UI:N/VC:H/VI:H/VA:H/SC:H/SI:H/SA:H
Kind of coding mistake
- CWE-829
If you cannot upgrade today
- Block the Git node immediately using n8n's node exclusion feature ([Docs](https://n8n-docs.teamlab.info/hosting/securing/blocking-nodes/#exclude-nodes)). This prevents any workflow from using it.
- Avoid cloning or pulling from untrusted or user-supplied repositories until you upgrade.
- Restrict workflow creation and editing to a small trusted team until you can upgrade.
Signs it may already have been used against you
- Search n8n execution logs for any workflows using the Git node, especially any that called the _Add Config_ operation.
- Look for Git operations that mention `core.hooksPath` or unusual `hooks` or `pre-commit` entries in Git configuration.
- Check for unexpected command execution or shell activity on the n8n host around the time of Git node executions.
- Review workflow audit logs for any new or modified workflows that use the Git node, created by users who do not normally work with Git integrations.
SecurityElites Fix Guide: step by step
- Check which version of n8n you are runningLog into the n8n interface. Go to Settings or About (usually in the bottom left). Note the exact version number. If it is 1.119.2 or later, you are protected. If it is 0.123.1 through 1.119.1, you are affected.
- Check if the Git node is in useIn n8n, search for workflows that use the Git node. Go to Workflows and search for 'Git' or look at workflow details. If no workflows use the Git node, the risk is lower but you should still upgrade.
- Review who can create or edit workflowsCheck n8n user permissions and roles. Find out who has the ability to create new workflows or edit existing ones. These people could exploit this flaw if they have bad intent or if their account is compromised.
- Back up your n8n data and configurationExport or snapshot your n8n database, encryption keys, and workflow definitions. This protects you if the upgrade encounters problems.
- Upgrade n8n to version 1.119.2 or laterFollow the official n8n upgrade documentation for your deployment method (Docker, npm, cloud, etc.). Deploy version 1.119.2 or the latest version available. Restart n8n after the upgrade is complete.
- Verify the upgrade was successfulLog back into n8n and confirm the version number is now 1.119.2 or later. Check that workflows still run and the Git node still appears in the node library (if you use it).
- Review recent workflow changes and Git operationsCheck the n8n execution logs and workflow audit history for any Git node activity in the past weeks, especially any unexpected changes to Git config or hooks. Look for workflows that set `core.hooksPath` or other Git configuration.
- If you cannot upgrade yet, disable the Git nodeIf you cannot upgrade immediately, block the Git node so no workflows can use it. See the n8n documentation for excluding nodes. This reduces risk until you can upgrade.
How to confirm it is fixed: Log into n8n and confirm the version number displayed in Settings or About is 1.119.2 or later.
SecurityElites Quick Fixes: copy and paste
Upgrade n8n with npmupgrade
npm install n8n@1.119.2
npm ls n8nCheck n8n version via Dockerfor this issue
docker exec <container_name> n8n --versionCheck n8n version via npmfor this issue
npm list 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-2025-65964) 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.119.2 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 allows arbitrary commands through Git hooks (CVE-2025-65964)
**Severity:** Critical | **SE Fix-First Score:** 51/100 | **Fix window:** Within 7 days
**Record:** SE-AIV-01843 https://securityelites.com/ai-vulnerabilities/cve-2025-65964-n8n-git-node-allows-arbitrary-commands-through-git-hooks/
### Why this matters
An attacker who can create or change an n8n workflow can run any command on the server where n8n runs. This means they could read files, delete data, install malware, or take over the entire server and everything it connects to.
### What to do
1. Check which version of n8n you are running
2. Check if the Git node is in use
3. Review who can create or edit workflows
4. Back up your n8n data and configuration
5. Upgrade n8n to version 1.119.2 or later
6. Verify the upgrade was successful
7. Review recent workflow changes and Git operations
8. If you cannot upgrade yet, disable the Git node
Full steps: https://securityelites.com/ai-vulnerabilities/cve-2025-65964-n8n-git-node-allows-arbitrary-commands-through-git-hooks/
### Done when
- [ ] n8n is at 1.119.2 or later everywhere it is installed
- [ ] Lock files, container images and CI configuration are updated
- [ ] Log into n8n and confirm the version number displayed in Settings or About is 1.119.2 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
- 8 Dec 2025: Made public
- 2 Dec 2026: Published
Official record
### ImpactThe n8n Git node allows workflows to set arbitrary Git configuration values through the _Add Config_ operation. When an attacker-controlled workflow sets `core.hooksPath` to a directory within the cloned repository containing a Git hook such as `pre-commit`, Git executes that hook during subsequent Git operations. Because Git hooks run as local system commands, this behavior can lead to **arbitrary command execution** on the underlying n8n host.Successful exploitation requires the ability to create or modify an n8n workflow that uses the Git node.Affected versions: **≥ 0.123.1 and < 1.119.2**### PatchesThis issue has been patched in **n8n version 1.119.2**.All users running affected versions should upgrade to **1.119.2 or later**.### WorkaroundsIf upgrading is not immediately possible, the following mitigations can reduce exposure:- Exclude the Git node ([Docs](https://n8n-docs.teamlab.info/hosting/securing/blocking-nodes/#exclude-nodes)). - Avoid cloning or interacting with untrusted repositories using the Git Node.
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-65964For 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.