Git Submodule Path CRLF Parsing Flaw and Symlink-Based Remote Code Execution (CVE-2025-48384)
Executive & SecOps Summary
SECOPS ASSESSMENTAll Git versions prior to 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
A remote attacker can craft a malicious repository with specially designed submodule paths and symlinks, leading to arbitrary post-checkout hook execution and full system compromise upon cloning.
Immediately upgrade Git clients to the patched versions (e.g., v2.50.1) and avoid recursively cloning untrusted repositories.
Affected Products & Version Scope
Remediation & Live Workaround Commands
PATCH & WORKAROUND1. Official Patch & Version Upgrade Commands
Update your Git client to the latest patched version using your operating system's package manager.
# For Ubuntu/Debian-based systems
sudo apt-get update && sudo apt-get install --only-upgrade git -y
# For RedHat/CentOS/Fedora-based systems
sudo dnf upgrade git -y
# For macOS (using Homebrew)
brew update && brew upgrade git2. Temporary Workaround & Hardening Configuration
If immediate patching is not feasible, disable automatic recursive submodule fetching when cloning untrusted repositories.
# Disable global automatic submodule recursion
git config --global submodule.recurse false
# Ensure you do not use the --recurse-submodules flag when cloning untrusted sources
# Example: git clone --no-recurse-submodules <repository_url>3. Log Audit & IoC Verification Commands
Verify the installed Git version and inspect local repositories for suspicious .gitmodules configurations containing CR characters or unexpected symlinks.
# 1. Check the current Git version
git --version
# 2. Scan for .gitmodules files containing CRLF/CR line endings
find . -name '.gitmodules' -exec file {} \; | grep 'CRLF'
# 3. Audit the repository for symbolic links pointing to internal Git directories
find . -type l -lsScan Your Repositories for Transitive Vulnerable Dependencies in 30 Seconds
Automatically detect vulnerable packages across npm, PyPI, Maven, and Go, and open automated fix Pull Requests without breaking your build.
Technical Root Cause & Exploitation Mechanics
1. Vulnerability Overview & Root Cause
This vulnerability stems from a flaw in how Git handles trailing carriage return (CR, \r) characters when reading and writing configuration files such as .gitmodules (CWE-436). When reading a configuration value, Git strips trailing CRLF line endings. However, when writing a configuration entry, values containing a trailing CR are not properly quoted. This causes the trailing CR to be lost or misinterpreted when the configuration is subsequently read, leading to path manipulation.
2. Exploitation Mechanics & Attack Scenario
An attacker can exploit this behavior by crafting a .gitmodules file where a submodule path contains a trailing CR character.
- When a victim initializes this submodule, Git reads the altered path and checks out the submodule into an unintended, incorrect directory.
- If the repository contains a symbolic link (CWE-59) pointing this altered path to the submodule's hooks directory (
.git/modules/.../hooks), the checkout process writes files into the hooks directory. - If the submodule contains an executable
post-checkouthook script, Git will automatically execute this script immediately after checkout, resulting in arbitrary code execution on the victim's machine.
3. Infrastructure & Business Impact
This vulnerability is highly critical and has been added to the CISA Known Exploited Vulnerabilities (KEV) catalog, indicating active exploitation in the wild. It poses a severe threat to developer workstations, CI/CD build pipelines, and automated code analysis environments. Successful exploitation allows attackers to gain initial access, steal proprietary source code, or launch devastating supply chain attacks.
Official Vendor Advisories & References
Git is a fast, scalable, distributed revision control system with an unusually rich command set that provides both high-level operations and full access to internals. When reading a config value, Git strips any trailing carriage return and line feed (CRLF). When writing a config entry, values with a trailing CR are not quoted, causing the CR to be lost when the config is later read. When initializing a submodule, if the submodule path contains a trailing CR, the altered path is read resulting in the submodule being checked out to an incorrect location. If a symlink exists that points the altered path to the submodule hooks directory, and the submodule contains an executable post-checkout hook, the script may be unintentionally executed after checkout. This 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.
Frequently Asked SecOps Questions (CVE-2025-48384)
FAQQ1. How critical is CVE-2025-48384 and is it actively exploited in the wild?
CVE-2025-48384 is rated CVSS 8.0 (HIGH) with a 30-day EPSS exploitation probability of 4.4%. It is listed in the CISA Known Exploited Vulnerabilities (KEV) catalog, requiring immediate emergency remediation.
Q2. Which vendors and products are affected by CVE-2025-48384?
Primary impacted vendors include git across git. Scope summary: Git versions v2.43.0 to v2.43.6, v2.44.0 to v2.44.3, v2.45.0 to v2.45.3, v2.46.0 to v2.46.3, v2.47.0 to v2.47.2, v2.48.0 to v2.48.1, v2.49.0, and v2.50.0
Q3. What temporary mitigations or workarounds exist for CVE-2025-48384 before patching?
[Mitigation] Immediately upgrade Git clients to the patched versions (e.g., v2.50.1) and avoid recursively cloning untrusted repositories. Follow the CLI remediation commands and interactive SecOps checklist on this page to restrict exposure prior to your maintenance window.
Generate an Internal Engineering Notice or CISO Report for CVE-2025-48384
Instantly format this advisory into an executive CISO summary or engineering patch ticket.
🔗 Related Advisories in Similar Stack (git)
View Category →GitLab CE/EE Unauthenticated Remote Code Execution (RCE) Advisory (CVE-2026-97229)
[Affected Scope] GitLab CE/EE versions 19.2 (< 19.2.8), 19.3 (< 19.3.5), and 19.4 (< 19.4.2)
GitLab CE/EE Unauthenticated Arbitrary File Read Vulnerability (CVE-2026-85706)
[Affected Scope] GitLab CE/EE versions from 18.7 through 19.3.1.
Google Brotli Decoder Remote Code Execution (RCE) and Memory Corruption Vulnerability (CVE-2026-111497)
[Affected Scope] All web servers, browsers, Node.js environments, and backend applications using Google Brotli library versions 1.0.3 through 1.2.0
JFrog Artifactory Authentication Bypass and Administrative Privilege Escalation (CVE-2026-82329)
[Affected Scope] JFrog Artifactory Self-Managed instances running under default configurations
Subscribe to Daily Vulnerability Briefings & KEV Alerts
Concise morning briefings for SecOps, DevSecOps, and SRE teams covering newly exploited CVEs and mitigation priorities.