CVE DatabaseCVE-2025-48384
한국어 권고문 →
CVE-2025-483848.0/HIGHCISA KEVCWE-59CWE-436

Git Submodule Path CRLF Parsing Flaw and Symlink-Based Remote Code Execution (CVE-2025-48384)

⚡ Jump to Patch
Affected Vendors
git
Affected Components
git
Published Date
2025-07-08
CVSS v3.1
8.0
HIGH
EPSS (30d)
4.4%
FIRST.org
CISA KEV
Exploited

Executive & SecOps Summary

SECOPS ASSESSMENT
Affected Scope

All 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

Impact

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.

Mitigation

Immediately upgrade Git clients to the patched versions (e.g., v2.50.1) and avoid recursively cloning untrusted repositories.

Affected Products & Version Scope

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

Remediation & Live Workaround Commands

PATCH & WORKAROUND

1. Official Patch & Version Upgrade Commands

Update your Git client to the latest patched version using your operating system's package manager.

bash
# 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 git

2. Temporary Workaround & Hardening Configuration

If immediate patching is not feasible, disable automatic recursive submodule fetching when cloning untrusted repositories.

bash
# 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.

bash
# 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 -ls
Interactive SecOps Remediation Checklist
0/4 (0%)
Recommended Security Control & Mitigation Partner
Snyk Open Source & Container Security
To secure your development pipelines and endpoints, immediately upgrade all Git installations to version v2.50.1 or higher.

Scan 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.

Free Forever Tier · 1-Click GitHub/GitLab Auto-PR
Master DevSecOps: Automated SAST/SCA in GitHub Actions & Kubernetes
View Course Curriculum

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-checkout hook 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

NVD Original English Description

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)

FAQ

Q1. 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.

SECOPS WORKBENCH INTEGRATION

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.

Generate Report →

🔗 Related Advisories in Similar Stack (git)

View Category →
SecOps Advisory Dispatch & RSS Feed

Subscribe to Daily Vulnerability Briefings & KEV Alerts

Concise morning briefings for SecOps, DevSecOps, and SRE teams covering newly exploited CVEs and mitigation priorities.

Slack / Teams / RSS Feed:
PatchKO
CVE-2025-48384 Git Submodule Path CRLF Parsing Flaw and Symlink-Based Remote Code Execution (CVE-2025-48384) (CVSS 8.0) - Patch & Workaround | CVE Pulse