Summary
Successful exploitation grants an attacker arbitrary code execution in the context of the user or service account performing the recursive clone, which places developer workstations, CI/CD runners, build servers, and platforms that process repositories on behalf of users squarely in scope. Because these environments routinely hold source code, signing keys, cloud credentials, package-registry tokens, and deployment secrets, a single compromised clone can serve as a foothold for credential theft, tampering with build outputs, and onward software supply chain compromise. The attack requires only that a victim or automated pipeline recursively clone an attacker-controlled repository, a routine developer action that is easy to induce through social engineering or by embedding malicious repositories as submodules, which makes the business risk significant for any organization with a software development footprint until patched Git versions are deployed across endpoints, automation, and Git-bundling applications.
| CVE | Name | Affected product |
|---|---|---|
| CVE-2026-111760 | Git Integer Truncation Vulnerability | Git Project Git |
Vulnerability Details
CVE-2026-111760 is a code execution vulnerability that allows a malicious repository to run arbitrary code on a victim's system. It affects Git's file checkout process, where Git validates each file path before writing it to the working directory and blocks any write that would overwrite protected internal metadata, most notably the .git entry that defines where a repository or submodule stores its configuration and history. The flaw lets an attacker bypass this validation. The vendor has not confirmed a CWE classification; based on the documented root cause, the issue maps to CWE-197 (Numeric Truncation Error).
The flaw sits in Git's index, which records each file's path and its length. When a path is extremely long, the stored length is truncated. Git validates the full, harmless-looking path but writes the file under the shorter, truncated name, so an attacker can pick a long path that shortens to exactly the location Git is meant to protect.
An attacker publishes a repository with a submodule and a path sized to collapse onto that submodule's .git file. When a developer or build system clones it with --recurse-submodules, Git writes a symbolic link in place of that file, pointing to an attacker-controlled directory that holds malicious configuration or hook scripts.
Git then treats the attacker's directory as the submodule's repository and acts on its contents, running attacker-controlled code with the privileges of the account that performed the clone. The victim needs to do nothing beyond the clone itself.
Fixes exist only for Git 2.56.1 and the 2.50 through 2.55 series (2.55.1, 2.54.1, 2.53.1, 2.52.1, 2.51.3, 2.50.2). No fix exists for Git 2.49 or earlier; users on those versions must move to a supported series. The fix rejects extremely long index paths before truncation and adds overflow checks to related memory allocations.
GitHub has patched github.com, GitHub Enterprise Cloud, and GitHub Enterprise Cloud with data residency, and has released GitHub Enterprise Server 3.19.15, 3.20.11, 3.21.9, and 3.22.4. Patched GitHub Desktop and GitHub Copilot app releases are being coordinated, and GitHub Codespaces and GitHub Actions will also receive patched Git. Treat any other application that bundles Git as affected until its vendor confirms an update.
The Git project rates the flaw CVSS v3.1 8.0 (High): network attack vector, high attack complexity, low privileges required, user interaction required, and changed scope. It considers the flaw triggerable only through clones that use --recurse-submodules. That offers little comfort: recursive cloning is routine in developer and build pipelines, on systems that hold source code, signing keys, and deployment credentials.
Affected products, CPE and CWE
| CVE ID | Affected products | Affected CPE | CWE ID |
|---|---|---|---|
| CVE-2026-111760 | Git Project Git (Before 2.56.1, 2.55.1, 2.54.1, 2.53.1, 2.52.1, 2.51.3, 2.50.2) | cpe:2.3:a:git-scm:git:*:*:*:*:*:*:*:* | CWE-197 (analyst-mapped; not vendor-confirmed) |
| GitHub Enterprise Server (Before 3.19.15, 3.20.11, 3.21.9, 3.22.4) | cpe:2.3:a:github:enterprise_server:*:*:*:*:*:*:*:* |
Recommendations
- 01
Upgrade Git Immediately
Update all Git installations to Git 2.56.1, or to the patched release for the maintenance series in use (2.55.1, 2.54.1, 2.53.1, 2.52.1, 2.51.3, or 2.50.2); systems on Git 2.49 or earlier have no fix and must move to a supported series. Use the operating system package manager or the official Git distribution. Updating is the most effective way to eliminate the vulnerability, and it should be prioritized on developer workstations and on any system that clones external repositories.
- 02
Upgrade GitHub Enterprise Server
Administrators of GitHub Enterprise Server should upgrade to versions 3.19.15, 3.20.11, 3.21.9, or 3.22.4, according to the release series deployed, as soon as possible. Schedule the upgrade as an emergency change where internal processes allow, since the server processes repository content on behalf of many users.
- 03
Update Applications That Bundle Git
Identify and update applications that ship their own copy of Git, such as GitHub Desktop, the GitHub Copilot app, IDEs, and Git GUI clients, because updating the system Git does not patch these bundled copies. Track vendor announcements for the coordinated GitHub Desktop and GitHub Copilot app releases and deploy them once available.
- 04
Patch Automation and Build Infrastructure
Update Git on CI/CD runners, self-hosted GitHub Actions runners, build servers, container base images, and any service that clones or processes repositories on behalf of users. Rebuild and redeploy container images that embed Git so that ephemeral build environments do not reintroduce vulnerable versions.
- 05
Restrict Recursive Clones of Untrusted Repositories
Until patches are fully deployed, clone only from trusted servers and avoid using
--recurse-submoduleson repositories from untrusted or unverified sources. Review scripts, pipeline definitions, and Git configuration for settings that enable submodule recursion by default, and disable them where they are not required, recognizing that these precautions reduce exposure but do not replace installing the fixes. - 06
Inspect Recently Cloned Repositories
Review repositories recently cloned from external sources for submodules whose
.gitentry is a symbolic link rather than a regular file or directory, and for unexpected hook scripts or configuration changes. Treat any such finding as a potential compromise, isolate the affected system, and rotate credentials that were accessible to the user or service account that performed the clone.
Potential MITRE ATT&CK TTPs
T1195Supply Chain CompromiseT1195.001Compromise Software Dependencies and Development ToolsT1203Exploitation for Client ExecutionT1204User ExecutionT1059Command and Scripting InterpreterT1059.004Unix ShellT1546Event Triggered ExecutionT1211Exploitation for Defense EvasionReferences & Patch Links
Patch links
- https://github.com/git/git/blob/v2.56.1/Documentation/RelNotes/2.56.1.adoc
- https://github.com/git/git/security/advisories/GHSA-vp2w-7xxj-jvxr
- https://git-scm.com/downloads
References
- https://github.blog/open-source/git/git-security-vulnerabilities-announced-7/
- https://github.com/git/git/security/advisories/GHSA-vp2w-7xxj-jvxr
- https://lore.kernel.org/git/xmqqh5hosgw5.fsf@gitster.g/
What Next?
At Hive Pro, it is our mission to detect the most likely threats to your organization and to help you prevent them from happening.
