CVE-2025-48384
None CISA KEVCVSS
—
EPSS
4.4%
Published
Jul 8, 2025
CISA due date
Sep 15, 2025
Cloudanix analysis
A malicious software repository can make Git run hidden code during checkout, potentially compromising developer machines or build systems.
- Exploitation
- Requires User Interaction
- Attacker needs
- User Interaction
- Complexity
- Moderate
- Impact
- Remote Code Execution
- Component
- Application
- Class
- Improper Input Validation
- Remediation
- Upgrade
- Effort
- Medium
- Patch risk
- Low
What it actually does
This vulnerability is an input-validation and path-confusion flaw in Git submodule handling. Git normalizes configuration values by stripping trailing CRLF when reading config, but when writing config entries it can fail to preserve a trailing carriage return in a submodule path. A repository can therefore define a submodule path that differs between write-time and read-time interpretation. During submodule initialization or checkout, Git may resolve the submodule into an unintended location. If the repository also contains a symlink that redirects the altered path into the submodule hooks directory, and the submodule includes an executable post-checkout hook, Git may execute attacker-controlled hook code as part of normal repository operations. The practical impact is local code execution in the context of the user or automation account running Git commands against a malicious repository.
Why it matters to the business
An attacker can turn a seemingly routine clone or submodule update into code execution on a developer workstation, build runner, CI worker, packaging system, or automation host. This can lead to theft of source code, credentials, signing keys, cloud tokens, package-publishing credentials, or insertion of malicious code into downstream software artifacts. Because this issue is listed in CISA KEV, has active in-the-wild exploitation, and has a remediation due date of 2025-09-15 for covered organizations, remediation should be treated as urgent even though the EPSS score is relatively low. The risk is highest for organizations that clone third-party repositories, build untrusted code, use Git submodules, or run automated dependency and packaging workflows.
How an attack unfolds
An attacker prepares a malicious Git repository containing a specially crafted submodule path with a trailing carriage return. The repository is structured so that Git records and later reads the submodule path differently because the trailing carriage return is lost during configuration processing. The attacker also places or induces a symlink so the normalized path resolves into the submodule's hooks directory. Inside that directory, the attacker provides an executable post-checkout hook. When a victim clones the repository and initializes or updates submodules, Git checks out the submodule into the attacker-influenced location and may execute the post-checkout hook automatically. The payload then runs with the privileges of the Git user or automation process, which can be a developer shell, CI job, package build container, or release pipeline. Public reporting tracks this as an actively exploited Git link-following vulnerability; defenders should assume malicious repositories may already be circulating.
How to fix it
Upgrade Git and Git-for-Windows to fixed releases immediately. The upstream fixed Git versions are 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 or later. For package-specific remediations provided in the input, upgrade helm-push for Chainguard to 0.10.4-r30 or later and helm-push for Wolfi to 0.10.4-r30 or later. Source-based consumers should include upstream Git commit 7a1903ad46b5cc7524c0734a5034dccaec07209b or later; Git-for-Windows consumers should include commit 4d32d83913170b86f9753fca10e75cdb2223d1cc or later. Prioritize patching developer workstations, CI/CD runners, build agents, release engineering systems, package builders, source mirrors, and any automation that clones external repositories or initializes submodules. Where immediate patching is not possible, avoid cloning untrusted repositories, disable or restrict recursive submodule initialization for untrusted code, run Git operations in isolated disposable sandboxes without secrets, mount workspaces with limited privileges, and prevent execution of repository-supplied hooks in automated workflows where feasible.
How to confirm the fix worked
Confirm all Git installations report a fixed version using `git --version` and verify the package manager, container image, developer tooling bundle, IDE-bundled Git, and CI runner images are not carrying older embedded Git binaries. Test representative build and clone workflows after upgrade, especially repositories using submodules. Review software bills of materials and base images for vulnerable Git or Git-for-Windows versions. For fixed package validation, confirm helm-push packages are at 0.10.4-r30 or later where applicable. To identify exposure, inventory systems that run `git clone --recurse-submodules`, `git submodule init`, `git submodule update`, or automated dependency fetches from third-party repositories. Inspect suspicious repositories for `.gitmodules` entries with carriage-return characters in submodule paths and for symlinks that point toward `.git/modules`, `hooks`, or submodule hook directories.
Typical attack path
- Attacker creates or compromises a Git repository that uses submodules.
- Attacker defines a submodule path containing a trailing carriage return so Git stores and later interprets the path inconsistently.
- Attacker adds a symlink that causes the normalized submodule path to resolve into a Git hooks directory.
- Attacker places an executable post-checkout hook containing the payload in the submodule content.
- Victim clones the repository or runs submodule initialization/update commands against it.
- Git processes the malformed submodule path, follows the attacker-controlled path redirection, and checks out content into the unintended location.
- Git executes the attacker-controlled post-checkout hook during checkout.
- Payload runs under the account executing Git and may steal credentials, modify source, persist in build scripts, or stage additional tooling.
How to detect it
Investigate whether Git operations against untrusted or recently added repositories executed unexpected hooks. Useful telemetry includes endpoint process creation logs, EDR events, shell history, CI/CD job logs, Git command logs, package build logs, file integrity monitoring, and repository workspace artifacts. Look for Git commands such as recursive clone or submodule update followed immediately by unusual child processes, including shells, scripting runtimes, download tools, credential-access commands, or network beacons. Inspect suspicious repositories and build workspaces for `.gitmodules` files containing literal carriage-return characters in submodule path values; these may appear as `^M`, `\r`, or abnormal line endings depending on tooling. Examine `.git/modules/*/hooks/` and submodule hook directories for executable `post-checkout` files. Also look for symlinks in repository worktrees that resolve into `.git/modules`, `.git/hooks`, or submodule hook directories. If suspicious hook execution is identified, preserve the repository, `.git` metadata, CI job workspace, process tree, command-line arguments, environment variables, and outbound network connection records, then rotate any credentials exposed to that execution context.
- .gitmodules
- post-checkout
- hooks/post-checkout
- .git/modules/
- /.git/modules/
- \r
- ^M
- git clone --recurse-submodules
- git submodule init
- git submodule update
- git submodule update --init
- git submodule update --init --recursive
- path = *^M
- .git/modules/*/hooks/post-checkout
- .git/hooks/post-checkout
- core.worktree
What your security team should do
- Treat this as urgent because it is in CISA KEV and is reported as actively exploited; complete remediation no later than the 2025-09-15 KEV deadline where applicable.
- Patch Git, Git-for-Windows, container images, CI runner images, developer workstation packages, IDE-bundled Git, and build toolchains to fixed versions.
- Temporarily block or sandbox cloning of untrusted repositories with submodules until patch coverage is verified.
- Hunt for recent clones or builds of unknown repositories that used recursive submodule initialization or submodule update commands.
- Search repositories and build workspaces for `.gitmodules` entries containing carriage-return characters and for executable `post-checkout` hooks in submodule hook paths.
- Remove secrets from Git clone/build environments where possible and rotate credentials if suspicious repository activity or hook execution is found.
- Add CI policy controls that prevent untrusted code from running with release, signing, package-publishing, or cloud-administration credentials.
- Monitor endpoint and CI telemetry for unusual child processes spawned by Git, shell interpreters, or hook scripts during checkout operations.
The record
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.
Affected packages
| Ecosystem | Package | Introduced | Fixed |
|---|---|---|---|
| AlmaLinux:10 | git | 0 | 2.47.3-1.el10_0 |
| AlmaLinux:10 | git-all | 0 | 2.47.3-1.el10_0 |
| AlmaLinux:10 | git-core | 0 | 2.47.3-1.el10_0 |
| AlmaLinux:10 | git-core-doc | 0 | 2.47.3-1.el10_0 |
| AlmaLinux:10 | git-credential-libsecret | 0 | 2.47.3-1.el10_0 |
| AlmaLinux:10 | git-daemon | 0 | 2.47.3-1.el10_0 |
| AlmaLinux:10 | git-email | 0 | 2.47.3-1.el10_0 |
| AlmaLinux:10 | git-gui | 0 | 2.47.3-1.el10_0 |
| AlmaLinux:10 | git-instaweb | 0 | 2.47.3-1.el10_0 |
| AlmaLinux:10 | git-subtree | 0 | 2.47.3-1.el10_0 |
| AlmaLinux:10 | git-svn | 0 | 2.47.3-1.el10_0 |
| AlmaLinux:10 | gitk | 0 | 2.47.3-1.el10_0 |
| AlmaLinux:10 | gitweb | 0 | 2.47.3-1.el10_0 |
| AlmaLinux:10 | perl-Git | 0 | 2.47.3-1.el10_0 |
| AlmaLinux:10 | perl-Git-SVN | 0 | 2.47.3-1.el10_0 |
| AlmaLinux:8 | git | 0 | 2.43.7-1.el8_10 |
| AlmaLinux:8 | git-all | 0 | 2.43.7-1.el8_10 |
| AlmaLinux:8 | git-core | 0 | 2.43.7-1.el8_10 |
| AlmaLinux:8 | git-core-doc | 0 | 2.43.7-1.el8_10 |
| AlmaLinux:8 | git-credential-libsecret | 0 | 2.43.7-1.el8_10 |
| AlmaLinux:8 | git-daemon | 0 | 2.43.7-1.el8_10 |
| AlmaLinux:8 | git-email | 0 | 2.43.7-1.el8_10 |
| AlmaLinux:8 | git-gui | 0 | 2.43.7-1.el8_10 |
| AlmaLinux:8 | git-instaweb | 0 | 2.43.7-1.el8_10 |
| AlmaLinux:8 | git-subtree | 0 | 2.43.7-1.el8_10 |
| AlmaLinux:8 | git-svn | 0 | 2.43.7-1.el8_10 |
| AlmaLinux:8 | gitk | 0 | 2.43.7-1.el8_10 |
| AlmaLinux:8 | gitweb | 0 | 2.43.7-1.el8_10 |
| AlmaLinux:8 | perl-Git | 0 | 2.43.7-1.el8_10 |
| AlmaLinux:8 | perl-Git-SVN | 0 | 2.43.7-1.el8_10 |
| AlmaLinux:9 | git | 0 | 2.47.3-1.el9_6 |
| AlmaLinux:9 | git-all | 0 | 2.47.3-1.el9_6 |
| AlmaLinux:9 | git-core | 0 | 2.47.3-1.el9_6 |
| AlmaLinux:9 | git-core-doc | 0 | 2.47.3-1.el9_6 |
| AlmaLinux:9 | git-credential-libsecret | 0 | 2.47.3-1.el9_6 |
| AlmaLinux:9 | git-daemon | 0 | 2.47.3-1.el9_6 |
| AlmaLinux:9 | git-email | 0 | 2.47.3-1.el9_6 |
| AlmaLinux:9 | git-gui | 0 | 2.47.3-1.el9_6 |
| AlmaLinux:9 | git-instaweb | 0 | 2.47.3-1.el9_6 |
| AlmaLinux:9 | git-subtree | 0 | 2.47.3-1.el9_6 |
| AlmaLinux:9 | git-svn | 0 | 2.47.3-1.el9_6 |
| AlmaLinux:9 | gitk | 0 | 2.47.3-1.el9_6 |
| AlmaLinux:9 | gitweb | 0 | 2.47.3-1.el9_6 |
| AlmaLinux:9 | perl-Git | 0 | 2.47.3-1.el9_6 |
| AlmaLinux:9 | perl-Git-SVN | 0 | 2.47.3-1.el9_6 |
| Alpine:v3.19 | git | 0 | 2.43.7-r0 |
| Alpine:v3.20 | git | 0 | 2.45.4-r0 |
| Alpine:v3.21 | git | 0 | 2.47.3-r0 |
| Alpine:v3.22 | git | 0 | 2.49.1-r0 |
| Bitnami | git | 0 | 2.50.1 |
| Debian:11 | git | 0 | No fix |
| Debian:12 | git | 0 | No fix |
| Debian:13 | git | 0 | No fix |
| Debian:14 | git | 0 | 1:2.50.1-0.1 |
| SUSE:Linux Enterprise Module for Basesystem 15 SP6 | git | 0 | 2.51.0-150600.3.12.1 |
| SUSE:Linux Enterprise Module for Basesystem 15 SP7 | git | 0 | 2.51.0-150600.3.12.1 |
| SUSE:Linux Enterprise Module for Development Tools 15 SP6 | git | 0 | 2.51.0-150600.3.12.1 |
| SUSE:Linux Enterprise Module for Development Tools 15 SP6 | git-lfs | 0 | 3.7.0-150600.13.3.1 |
| SUSE:Linux Enterprise Module for Development Tools 15 SP6 | obs-scm-bridge | 0 | 0.7.4-150600.14.4.1 |
| SUSE:Linux Enterprise Module for Development Tools 15 SP7 | git | 0 | 2.51.0-150600.3.12.1 |
| SUSE:Linux Enterprise Module for Development Tools 15 SP7 | git-lfs | 0 | 3.7.0-150600.13.3.1 |
| SUSE:Linux Enterprise Module for Development Tools 15 SP7 | obs-scm-bridge | 0 | 0.7.4-150600.14.4.1 |
| SUSE:Linux Enterprise Module for Python 3 15 SP6 | python-PyYAML | 0 | 6.0.2-150600.10.3.1 |
| SUSE:Linux Enterprise Module for Python 3 15 SP7 | python-PyYAML | 0 | 6.0.2-150600.10.3.1 |
| SUSE:Linux Enterprise Server 12 SP5-LTSS | git | 0 | 2.26.2-27.81.1 |
| SUSE:Linux Enterprise Server LTSS Extended Security 12 SP5 | git | 0 | 2.26.2-27.81.1 |
| openSUSE:Leap 15.6 | git | 0 | 2.51.0-150600.3.12.1 |
| openSUSE:Leap 15.6 | git-lfs | 0 | 3.7.0-150600.13.3.1 |
| openSUSE:Leap 15.6 | obs-scm-bridge | 0 | 0.7.4-150600.14.4.1 |
| openSUSE:Leap 15.6 | python-PyYAML | 0 | 6.0.2-150600.10.3.1 |
| openSUSE:Tumbleweed | git | 0 | 2.50.1-1.1 |
Related vulnerabilities
- CVE-2024-52005 Git is a source code management tool. Also affects git
- CVE-2024-52006 Git is a fast, scalable, distributed revision control system with an unusually rich… Also affects git
- CVE-2024-50349 Git is a fast, scalable, distributed revision control system with an unusually rich… Also affects git
- CVE-2017-1000117 A malicious third-party can give a crafted "ssh://..." URL to an unsuspecting victim, and… Also affects git
- CVE-2022-25648 The package git before 1.11.0 are vulnerable to Command Injection via git argument… Also affects git
- CVE-2014-9390 Git before 1.8.5.6, 1.9.x before 1.9.5, 2.0.x before 2.0.5, 2.1.x before 2.1.4, and 2.2.x… Also affects git
- CVE-2017-15298 Git through 2.14.2 mishandles layers of tree objects, which allows remote attackers to… Also affects git
- CVE-2017-14867 Git before 2.10.5, 2.11.x before 2.11.4, 2.12.x before 2.12.5, 2.13.x before 2.13.6, and… Also affects git