Skip to main content
Live Webinar with SANS (June 25)— Agentic CTI Automation for Fun & ProfitRegister Free
Mallory
HighCISA KEVExploited in the wildPublic exploit

Git submodule path CR parsing vulnerability leading to hook execution

IdentifiersCVE-2025-48384CWE-59· Improper Link Resolution Before…

CVE-2025-48384 is a high-severity vulnerability in Git caused by inconsistent handling of trailing carriage return characters in configuration values. When Git reads a config value, it strips trailing CRLF, but when it writes a config entry, a value ending in a trailing carriage return is not quoted, so the CR is later lost on read. During submodule initialization, a malicious repository can abuse this mismatch by placing a trailing CR in a submodule path in .gitmodules. Git then resolves the altered path incorrectly and checks out the submodule to an unintended location. If the attacker also arranges for a symlink from that altered path to the submodule hooks directory, and the submodule contains an executable post-checkout hook, Git may execute attacker-controlled code as part of checkout. Supporting reporting also indicates the path confusion can be leveraged for arbitrary filesystem writes in certain repository layouts, especially during recursive clone operations on macOS and Linux.

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 can result in arbitrary code execution on the victim system in the context of the user running Git. The flaw can also enable arbitrary file writes to attacker-chosen locations in some layouts, including placement or overwrite of Git hook scripts and potentially Git configuration files. This creates risk of immediate code execution during checkout or deferred execution when the victim later runs normal Git operations such as commit or merge. Secondary impacts described in reporting include persistence via malicious hooks and possible source-code exfiltration through modified Git configuration.

Mitigation

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

Until patching is complete, avoid cloning untrusted repositories with submodules, especially using recursive clone operations. Avoid or restrict git clone --recursive against untrusted content. Disable or redirect Git hooks globally where operationally feasible, for example via core.hooksPath, to prevent repository-controlled hooks from executing. Apply least privilege for developer and build environments, and monitor for suspicious .gitmodules content, unexpected submodule paths, hook creation, or anomalous Git child-process execution during clone and checkout.

Remediation

Patch, then assume compromise.

Upgrade Git to a fixed release. The vulnerability is fixed in v2.43.7, v2.44.4, v2.45.4, v2.46.4, v2.47.3, v2.48.2, v2.49.1, and v2.50.1. Use the appropriate patched version for the deployed branch, including vendor-packaged builds such as macOS Command Line Tools or products bundling Git. Validate that developer workstations, CI/CD runners, and any tooling that performs recursive clones are updated.
PUBLIC EXPLOITS

Exploits

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

VALID 14 / 44 TOTALView more in app
CVE-2025-48384-submoduleMaturityPoCVerified exploit

This repository demonstrates a proof-of-concept exploit for CVE-2025-48384 using a malicious git 'post-checkout' hook. The repository contains two files: a README.md describing the purpose, and a 'post-checkout' bash script. The script, when executed as a git hook, writes a flag ('CTF{you_triggered_cve_2025_48384}') to /tmp/flag.txt and prints a message to standard error indicating that RCE was triggered. The exploit is local in nature, requiring the victim to execute the malicious git hook, typically by performing a 'git checkout' in a repository containing this hook. No network endpoints are involved; the only fingerprintable endpoint is the file '/tmp/flag.txt'. The exploit serves as a demonstration of the vulnerability and does not include weaponized or remote payloads.

vignesh21-gitDisclosed Dec 14, 2025bashlocal
CVE-2025-48384MaturityPoCVerified exploit

This repository is a proof-of-concept (PoC) for CVE-2025-48384, a vulnerability in Git related to handling of carriage return characters in submodule paths. The repository contains a Bash script (scripts/update-gitlink.sh) that programmatically creates or updates a submodule entry in the Git index with a path containing a carriage return character (sub^M). This is achieved by using Git's low-level update-index command with a specially crafted path. The script allows the user to specify the submodule URL and commit, defaulting to a placeholder GitHub repository. The README provides context and warnings, and the .gitmodules file references the submodule. The attack vector is local, requiring the user to run the script in a Git repository. The main fingerprintable endpoints are the submodule URL and the crafted submodule path. The repository is structured as a minimal PoC, with the main exploit logic in the Bash script.

vignesh21-gitDisclosed Dec 14, 2025bashlocal
CVE-2025-48384-mainMaturityPoCVerified exploit

This repository is a Proof-of-Concept (PoC) exploit for CVE-2025-48384, a vulnerability in Git related to submodules. The repository itself contains no executable code, but is structured to demonstrate the exploit: it includes a .gitmodules file referencing a malicious submodule, and a README.md with instructions to clone the repository with submodules enabled. The actual payload is hosted in a separate submodule repository and is executed via a Git hook (post-checkout) when the submodule is initialized. The exploit demonstrates how an attacker can achieve remote code execution on a victim's machine if they clone the repository with submodules. No direct code files are present in this repository; the exploit relies on Git's submodule and hook mechanisms. The main fingerprintable endpoints are the GitHub URLs for the main and submodule repositories, and the payload location.

zr0nDisclosed Dec 4, 2025network
CVE-2025-48384-subMaturityPoCVerified exploit

This repository contains a single file named 'post-checkout', which is a short bash script. The script prints a message indicating infection and then executes a netcat (nc) command to open a reverse shell to 192.168.0.47 on port 4444, executing /bin/bash. The exploit is operational, providing remote shell access to the attacker if executed on a vulnerable system. The main attack vector is local execution, and the script targets generic Linux systems with netcat and bash available. The only endpoints referenced are the attacker's IP and port, and the local /bin/bash binary. The repository is minimal and focused solely on establishing a reverse shell.

zr0nDisclosed Dec 4, 2025bashlocal
CVE-2025-48384MaturityPoCVerified exploit

This repository is a Capture The Flag (CTF) challenge and proof-of-concept (PoC) for CVE-2025-48384, a critical client-side remote code execution (RCE) vulnerability in Git. The exploit leverages improper handling of carriage return (CR) characters in submodule paths within the .gitmodules file. By crafting a submodule path with a trailing CR and creating a symlink from the sanitized path to the .git/hooks directory, the attacker ensures that when a vulnerable Git client clones the repository recursively, a malicious post-checkout hook from the submodule is executed, resulting in arbitrary code execution. The repository includes detailed documentation (CTF/Implementation.md, CTF/Malicious-Git-Repo.md) on how to set up the exploit for CTF purposes, a Dockerfile for building a vulnerable Git environment, and scripts (scripts/poc.sh, scripts/update-gitlink.sh) to automate the PoC and update the malicious submodule reference. The main exploit payload is a shell script (post-checkout hook) that writes a flag to /tmp/flag.txt, demonstrating successful exploitation. The .gitmodules file references a malicious submodule hosted at https://github.com/s41r4j/CVE-2025-48384-submodule.git, and the exploit relies on Unix-like symlink behavior. The repository is not part of a framework and is structured for educational and CTF demonstration purposes. It targets Git clients on Linux, macOS, and Windows (with caveats for symlink handling), and is relevant for developer environments, CI/CD pipelines, and any context where untrusted repositories may be cloned with submodules.

s41r4jDisclosed Sep 12, 2025bashdockerfilenetwork
CVE-2025-48384-submoduleMaturityPoCVerified exploit

This repository contains a proof-of-concept exploit for CVE-2025-48384, implemented as a shell script ('post-checkout'). The script is designed to be executed as a git hook, likely as part of a malicious submodule or repository. Upon execution, it attempts to exfiltrate the contents of /etc/passwd to a remote server (https://cve48384.requestcatcher.com) using curl or wget. It also attempts to establish a reverse shell connection to a hardcoded IP address and port (10.11.0.7:4444), using several fallback methods (bash, nc, or sh with redirected sockets) for reliability. The script optionally copies a local flag file if present. The exploit demonstrates both data exfiltration and remote shell access capabilities, and is operational with hardcoded payloads. The main entry point is the 'post-checkout' shell script.

s41r4jDisclosed Sep 13, 2025shlocal
CVE-2025-48384MaturityPoCVerified exploit

This repository is a proof-of-concept (PoC) exploit for CVE-2025-48384, a vulnerability in Git (tested on version 2.50.0) that allows remote code execution when a repository with a malicious submodule is recursively cloned. The exploit leverages a crafted submodule path containing a carriage return and a malicious post-checkout hook to achieve code execution. The main payload is a simple Bash command that creates the file /tmp/fishsucks to demonstrate successful exploitation. The repository contains a Bash script (exploit.sh) that simulates the exploit process and calls a payload script (expected to be in a submodule). The README provides detailed reproduction steps and scripts for both local and GitHub-based exploitation. Key fingerprintable endpoints include the /tmp/fishsucks file (created as a marker of exploitation), the .git/modules/sub/hooks directory (used for malicious hooks), and referenced GitHub repositories for submodules. The exploit requires the target to clone the repository with submodules enabled on a vulnerable Git version, making the attack vector local (triggered by user action).

arun1033Disclosed Aug 29, 2025bashlocal
CVE-2025-48384-pocMaturityPoCVerified exploit

This repository is a proof-of-concept (POC) exploit for CVE-2025-48384, an improper link resolution vulnerability in Git affecting certain versions on Linux and MacOS. The exploit leverages a crafted .gitmodules file and a submodule with a malicious git hook. By manipulating the submodule path to include a carriage return and symlinking the hooks directory, arbitrary code execution can be triggered when a user clones the repository recursively. The included payload is a bash script that creates a file in the user's home directory, demonstrating successful exploitation. The repository contains a README with detailed reproduction steps, a .gitmodules file referencing the malicious submodule, and a 'sub' file representing the symlinked hooks directory. No actual exploit code is present in the repository; the exploit relies on repository structure and configuration to achieve its effect.

jacobholtzDisclosed Aug 28, 2025bashlocal
CVE-2025-48384-testMaturityPoCVerified exploit

This repository is a proof-of-concept (POC) exploit for CVE-2025-48384, targeting a vulnerability in Git related to submodule path and configuration manipulation. The repository contains three files: a .gitmodules file with a submodule entry pointing to a potentially malicious repository, a README.md with detailed instructions for setting up the exploit scenario, and a 'sub' file referencing a path ('.git/modules/sub/hooks') likely used to demonstrate the exploit's effect. The exploit works by manipulating the submodule path to include carriage return characters and altering the submodule configuration, which may lead to arbitrary file writes or path confusion on the target system. The main capability demonstrated is the abuse of Git submodule configuration to achieve unintended file system effects, which could be leveraged for further exploitation if the target is vulnerable. No traditional code files or payloads are present; the exploit is configuration-based and relies on user interaction with Git commands. The endpoints involved are GitHub repository URLs used for submodule referencing and demonstration.

beishanxueyuanDisclosed Aug 4, 2025local
CVE-2025-48384MaturityPoCVerified exploit

This repository is a proof-of-concept (PoC) exploit for CVE-2025-48384, a vulnerability in Git affecting versions prior to specific patch releases (see affected versions). The exploit leverages a crafted .gitmodules file with a submodule path containing a carriage return (\r) character, which, due to Git's handling of configuration files, allows an attacker to place a malicious post-checkout hook in the victim's local .git/modules/sub/hooks directory. When a user clones the repository recursively, the attacker's script is executed, resulting in remote code execution (RCE) on the victim's machine. The provided payload is a simple Bash script that creates a file at /tmp/CVE-2025-48384 to demonstrate code execution. The repository contains a README.md with detailed technical explanation, a .gitmodules file with the malicious path, and a reference to a submodule. The exploit targets Linux/Unix systems running vulnerable Git versions and requires the victim to perform a recursive clone. No network-based attack vector is present; the attack is triggered by local actions during repository cloning.

IK-20211125Disclosed Jul 20, 2025bashzshlocal
cve-2025-48384-hubMaturityPoCVerified exploit

This repository contains a single file, 'post-checkout', which is a bash script intended to be used as a git hook. When executed (typically after a git checkout operation), it initiates a reverse shell from the victim's machine to the attacker's machine at 192.168.0.115 on TCP port 55553. The script leverages bash's ability to open TCP connections via /dev/tcp. The exploit is operational, as it provides a working reverse shell payload, but it requires the attacker to place the script in a location where it will be executed by the victim (e.g., as a malicious git hook). There are no references to specific CVEs or products, and the attack vector is local, relying on social engineering or supply chain compromise to achieve execution.

altm4nDisclosed Jul 10, 2025bashlocal
CVE-2025-48384MaturityPoCVerified exploit

This repository is a proof-of-concept (PoC) exploit for CVE-2025-48384, a vulnerability in Git related to submodule handling. The repository itself contains minimal files: a .gitmodules file referencing a malicious submodule, a README.md with usage instructions and explanation, and a 'sub' file indicating the submodule path. The exploit works by having a user clone the repository with submodules enabled and the file protocol allowed, which causes Git to fetch and initialize a submodule from a remote repository. The submodule contains a post-checkout hook (payload) that is executed, resulting in remote code execution (RCE) on the user's system. The actual payload is not present in this repository but is referenced and hosted in the submodule repository. No code files are present in this repository; the exploit relies on Git's submodule and hook mechanisms. The main attack vector is local, triggered by a user action (cloning the repository).

liamgDisclosed Jul 9, 2025local
CVE-2025-48384-POCMaturityPoCVerified exploit

This repository is a proof-of-concept (POC) exploit for CVE-2025-48384, targeting vulnerable versions of git. The repository contains three files: a .gitmodules file that defines a submodule with a malicious configuration, a README.md that explains how to trigger the exploit, and a 'sub' file that appears to be a placeholder or reference to a submodule directory. The exploit works by instructing the user to clone the repository recursively with a vulnerable git version. Upon doing so, a file named /tmp/sectest will be created on the system, demonstrating the ability to perform arbitrary file writes via submodule abuse. No traditional code files are present; the exploit is implemented through git configuration and repository structure manipulation. The only fingerprintable endpoint is the file path /tmp/sectest, which is used to demonstrate successful exploitation.

fishyyhDisclosed Jul 9, 2025local
CVE-2025-48384MaturityPoCVerified exploit

This repository is a proof-of-concept (POC) exploit for CVE-2025-48384, a vulnerability in Git that allows remote code execution (RCE) when cloning a repository with a malicious submodule path containing a carriage return character. The exploit leverages a specially crafted .gitmodules file and submodule configuration to execute arbitrary code on the target system during a recursive clone operation. The README.md contains detailed reproduction steps and scripts (in fish shell) that demonstrate the vulnerability by creating a file (/tmp/fishsucks) on the target system. The repository structure is minimal, with the main exploit logic described in the README and a .gitmodules file referencing a malicious submodule. The attack vector is network-based, requiring the victim to clone the repository with submodules enabled. The exploit targets vulnerable versions of Git (e.g., 2.50.0) on Linux platforms.

acheong08Disclosed Jul 8, 2025fishbashnetwork
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
AppleXcodeapplication
DebianDebian Linuxoperating_system
Git-ScmGitapplication

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 evidence1

Every observed campaign linking this CVE to a named adversary.

Associated malware

Malware families riding this exploit, with evidence and IOCs.

Detection signatures1

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 activity79

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