n8n Vulnerable to Remote Code Execution via Git Node Pre-Commit Hook
High8.8CVE-2025-62726 · Published Oct 30, 2025
Affected versions
| Package | Affected | Fixed in |
|---|---|---|
| n8n npm | < 1.113.0 | 1.113.0 |
Details and references
### 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.
- CVSS 3.1
- CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H
- Severity from
- GitHub (reviewed advisory)
- Weakness
- CWE-829
- Also known as
- CVE-2025-62726
More n8n advisories
All n8n| Date | Advisory | Severity | Fixed in |
|---|---|---|---|
| Oct 92025 | n8n: Execute Command Node Allows Authenticated Users to Run Arbitrary Commands on Host CVE-2025-71380High8.8no fix yet | High8.8 | No fix yet |
| Dec 82025 | n8n vulnerable to Remote Code Execution via Git Node Custom Pre-Commit Hook CVE-2025-65964Criticalfixed in 1.119.2 | Critical | 1.119.2 |
| Sep 152025 | Stored XSS in n8n LangChain Chat Trigger Node via initialMessages Parameter CVE-2025-58177Medium4.1fixed in 1.107.0 | Medium4.1 | 1.107.0 |
| Dec 222025 | n8n Vulnerable to Remote Code Execution via Expression Injection CVE-2025-68613Critical9.9fixed in 1.120.4, 1.121.1 | Critical9.9 | 1.120.4, 1.121.1 |
| Dec 262025 | n8n's Possible Stored XSS in "Respond to Webhook" Node May Execute Outside iframe Sandbox CVE-2025-61914High7.3fixed in 1.114.0 | High7.3 | 1.114.0 |
| Dec 262025 | n8n Vulnerable to Arbitrary Command Execution in Pyodide based Python Code Node CVE-2025-68668Critical9.9fixed in 2.0.0 | Critical9.9 | 2.0.0 |