Skip to main content
Live Webinar with SANS (June 25)— Agentic CTI Automation for Fun & ProfitRegister Free
Mallory
HighPublic exploit

n8n Git Node Remote Code Execution via Malicious pre-commit Hook

IdentifiersCVE-2025-62726CWE-829· Inclusion of Functionality from…

CVE-2025-62726 is a remote code execution vulnerability in the Git Node component of n8n affecting both Cloud and Self-Hosted deployments prior to version 1.113.0. The issue occurs when an n8n workflow clones an attacker-controlled remote Git repository containing a malicious pre-commit hook and later performs a Commit operation through the Git Node. In that sequence, the hook can be executed automatically with the privileges of the n8n process, resulting in arbitrary code execution inside the n8n environment. Based on the provided content, the root cause is insufficient isolation or trust handling around Git hook execution from untrusted repositories, consistent with CWE-829.

Share:
For your environment

Are you exposed to this one?

Mallory correlates every CVE against your assets, your vendors, and active adversary campaigns. Know which vulnerabilities matter for you, not just which ones are loud.

ANALYST BRIEF

Impact, mitigation & remediation

What it means. What to do now. Patch path, mitigations, and the assume-compromise checklist.

Impact

What an attacker gets, and what they’ve been doing with it.

Successful exploitation allows arbitrary code execution in the context of the n8n process. This can lead to compromise of the n8n host or runtime environment, theft or misuse of credentials accessible to n8n, modification of workflow logic, abuse of connected third-party integrations, and broader compromise of automated business processes handled by the platform.

Mitigation

If you can’t patch tonight, do this now.

If immediate upgrading is not possible, avoid cloning untrusted repositories through the Git Node and restrict Git Node usage to trusted repositories only. Review Git-based workflows for clone-plus-commit sequences that could trigger hooks, monitor n8n instances for suspicious process execution or workflow behavior, and limit the privileges and credential exposure of the n8n runtime to reduce blast radius.

Remediation

Patch, then assume compromise.

Upgrade n8n to version 1.113.0 or later, which fixes this vulnerability. Review workflows that use the Git Node, especially any that clone repositories from untrusted or externally controlled sources, and inspect affected environments for signs that malicious Git hooks may have executed prior to patching.
PUBLIC EXPLOITS

Exploits

3 valid exploits after Mallory filtered fakes, detection scripts, and README-only repos (2 hidden).

VALID 3 / 5 TOTALView more in app
cve-2025-62726-pocMaturityPoCVerified exploit

This repository is a proof-of-concept exploit for CVE-2025-62726, targeting the n8n workflow automation platform (versions < 1.113.0). The exploit leverages a vulnerability in the n8n Git Node, which fails to sanitize or isolate git hooks when cloning repositories. The main workflow, defined in 'Deploy Application to Production - Backup.json', automates the process of cloning a repository, injecting a malicious pre-commit hook, and performing git operations that trigger the hook. The malicious hook opens a reverse shell to the attacker's machine (host.docker.internal:4444) using Node.js. The repository also includes a docker-compose.yml file to set up a vulnerable n8n instance for testing. The exploit demonstrates remote code execution via git hooks and is intended for educational purposes.

baktistrDisclosed Nov 24, 2025jsonyamlnetwork
cve-2025-62726-malicious-repoMaturityPoCVerified exploit

This repository contains a single file: a shell script intended as a git pre-commit hook. The script sets up a Node.js-based reverse shell that, when executed, connects to a specified attacker's IP address and port (defaulting to host.docker.internal:4444). Upon connection, it spawns a /bin/sh shell and redirects its input and output over the network socket, effectively granting the attacker remote shell access to the victim machine. The exploit is operational and requires the victim to execute the pre-commit hook, making it a local attack vector. The script is concise and leverages both shell scripting and Node.js for its payload. No specific CVEs or products are targeted; the exploit is generic and relies on social engineering or misconfiguration to be executed.

baktistrDisclosed Nov 24, 2025shellnodejslocal
CVE-2025-62726-POC---n8n-Git-Node-RCEMaturityPoCVerified exploit

This repository is a comprehensive proof-of-concept (POC) for CVE-2025-62726, a critical remote code execution (RCE) vulnerability in n8n (versions < 1.113.0) when using the Git Node. The exploit leverages the fact that n8n's Git Node clones external repositories, including their .git/hooks directory, and executes git commit operations. If a malicious pre-commit hook is present, it is executed with the privileges of the n8n process, allowing arbitrary code execution. The repository is structured for educational and demonstration purposes, containing detailed guides, attack flow diagrams, mitigation instructions, and a realistic n8n workflow (n8n-workflow.json) that simulates a CI/CD deployment pipeline. The core exploit resides in the malicious-repo/.git/hooks/pre-commit file, which contains a reverse shell payload (or, in some variants, a credential harvester or remote payload fetcher). When the workflow is executed, the malicious hook is triggered, providing the attacker with a shell on the n8n container or exfiltrating sensitive data. Key files include: - malicious-repo/.git/hooks/pre-commit: The main payload (reverse shell or data exfiltration) - n8n-workflow.json: Workflow that clones the malicious repo and triggers the exploit - payloads/payload.sh: Standalone reverse shell payload - run-demo.sh, verify-setup.sh: Scripts to automate and verify the demo environment - docker-compose.yml: Spins up a vulnerable n8n instance for testing The exploit demonstrates a realistic supply chain attack scenario, where a seemingly legitimate repository is weaponized with a hidden git hook. The documentation provides step-by-step instructions for setup, exploitation, and mitigation, making it suitable for security training and awareness. The attack vector is network-based, requiring only low privileges (workflow creation) on the target n8n instance. The exploit is operational, with a working payload and clear demonstration of impact (RCE, credential theft, persistence).

baktistrDisclosed Nov 24, 2025bashjsonnetwork
EXPOSURE SURFACE

Affected products & vendors

Products and vendors Mallory has correlated with this vulnerability. Open in Mallory to drill down to specific CPE configurations and version ranges.

VendorProductType
N8nN8napplication

Vendor-confirmed product mapping. Mallory continuously reconciles this list against your asset inventory.

What this page doesn’t show

The version that knows your environment.

This page is what’s public. Mallory adds the parts that aren’t: which of your assets are affected, which adversaries are exploiting it right now, which detections to deploy, and what to do tonight.
Exposure mapping

Query your assets running an affected version, and investigate the blast radius.

Threat actor evidence

Every observed campaign linking this CVE to a named adversary.

Associated malware

Malware families riding this exploit, with evidence and IOCs.

Detection signatures

YARA, Sigma, Snort, and vendor rules, auto-deployed to your SIEM.

Vendor-by-vendor mapping

Cross-references every affected SKU, including bundled OEM variants.

Social activity5

Community discussion across Reddit, Mastodon, and other social sources.