Skip to main content
← All vulnerabilities
CVE-2025-48384

Git allows arbitrary code execution through broken config quoting

Only affects Git setups that initialize submodules whose path has a trailing CR and a symlink to the hooks directory. Fixed in 2.43.7, 2.44.4, 2.45.4, 2.46.4, 2.47.3, 2.48.2, 2.49.1 and 2.50.1.

Published
Last modified
published
Listed in CISA KEV
Actively exploited
Fix
Fixed in 2.43.7, 2.44.4, 2.45.4, 2.46.4, 2.47.3, and 3 more
None on Exploit-DB, Metasploit or GitHub

Summary

Git, a widely used distributed version control system, is affected by this vulnerability. An attacker could craft a repository so that a malicious script runs during submodule checkout, potentially allowing arbitrary code execution on the user's machine.

Summarized by anthropic/claude-haiku-5.5. Verify details against the original sources.

Read the original 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.

Timeline

  1. CVE published
  2. Added to CISA KEV

    CISA has evidence of exploitation in the wild

  3. CISA remediation deadline

    Due date for US federal agencies to patch

  4. Record last updated

Affected versions

  • git git

    fixed in 2.43.7; From 2.44.0-rc0 · fixed in 2.44.4; From 2.45.0-rc0 · fixed in 2.45.4; From 2.46.0-rc0 · fixed in 2.46.4; From 2.47.0-rc0 · fixed in 2.47.3; From 2.48.0-rc0 · fixed in 2.48.2; From 2.49.0-rc0 · fixed in 2.49.1; From 2.50.0-rc0 · fixed in 2.50.1

References 1

GitHub · git/git

FAQ

Questions about CVE-2025-48384

What does this mean?

Broken config quoting can cause a script in a submodule's post-checkout hook to run unintentionally after checkout. This happens when a submodule path contains a trailing CR during submodule initialization and a symlink points the altered path to the submodule hooks directory.Source: github.com

Am I affected, and how do I check?

Git versions before 2.43.7, and 2.44.0-rc0 through 2.44.3, 2.45.0-rc0 through 2.45.3, 2.46.0-rc0 through 2.46.3, 2.47.0-rc0 through 2.47.2, 2.48.0-rc0 through 2.48.1, 2.49.0-rc0 through 2.49.0, and 2.50.0-rc0 through 2.50.0 are in the affected ranges. Check the installed version with git --version. The issue also needs a submodule with an executable post-checkout hook and a path with a trailing CR.Source: github.com

What should I do about it?

Upgrade to Git 2.43.7, 2.44.4, 2.45.4, 2.46.4, 2.47.3, 2.48.2, 2.49.1, 2.50.1, or a later release on the same branch.Source: github.com

Is it being exploited?

Yes. CISA added it to its Known Exploited Vulnerabilities catalog on 2025-08-25, which means it has evidence of attacks. No public exploit code is tracked.Source: cisa.gov, cve.now feed data