Git 2.56.1 shipped this week with a fix for CVE-2026-111760, a flaw that permits arbitrary code execution when cloning malicious repositories with submodules. The vulnerability sits at the intersection of a common workflow and an integer truncation bug in Git's index handling—a combination that should concern anyone managing repositories or hosting infrastructure.
How the Attack Works
The vulnerability hinges on how Git processes submodule information during recursive clones. When a developer or CI pipeline runs git clone --recurse-submodules, Git reads metadata from the parent repository's index to determine which submodule versions to fetch. An attacker who controls a malicious repository can craft its index file such that an integer truncation occurs during parsing. This truncation causes Git to misinterpret object references, potentially leading to the execution of attacker-controlled code on the cloning system.
The attack is silent. The cloning process appears normal to the user—no error messages, no warnings. The malicious code runs with the privileges of the user performing the clone, which in automated environments often means CI/CD runners or service accounts with elevated access.
Scope and Risk Assessment
This affects Git versions 2.50 through 2.55, with fixes released across the entire supported range: 2.50.2, 2.51.3, 2.52.1, 2.53.1, 2.54.1, and 2.55.1, plus the latest 2.56.1. The attack vector is specific to recursive clones—straightforward git clone operations without submodules are not vulnerable. However, submodule usage is ubiquitous in larger projects, and many CI/CD systems default to recursive cloning.
The practical risk depends on whether an attacker can poison a repository that your infrastructure will clone. For closed-source projects with strict access controls, the barrier is high. For open-source maintainers, forks, or internal projects where external contributors can submit pull requests or create branches, the risk is material. Build systems that automatically clone untrusted repositories are particularly exposed.
Immediate Actions for Repository Operators
First priority: patch Git across all systems that perform clones. This includes development machines, CI/CD runners, container image build pipelines, and any automation that interacts with repositories. If you manage shared hosting infrastructure or VPS environments where users run Git operations, consider whether you can push security updates or at least communicate the urgency to your users.
Second, audit your Git configuration and workflows. Recursive clones are convenient but create a larger attack surface. Evaluate whether your projects genuinely need automatic submodule fetching, or whether explicit submodule initialization steps would be safer. Some teams have moved to Git worktrees or monorepo tooling specifically to reduce the attack surface of submodule handling.
Third, if you operate a Git hosting platform or repository mirror service, test your infrastructure against the vulnerability. Some platforms may cache or proxy repository metadata in ways that could mask or amplify the risk.
Longer-Term Hardening
This vulnerability underscores why repository operations should be treated as a security boundary. Cloning code is code execution—there is no safe way to execute arbitrary build, hook, or initialisation scripts from an untrusted source without sandboxing. Teams should consider running CI/CD jobs in isolated containers with minimal network access and filesystem mounts. Similarly, development machine workflows that clone arbitrary repositories benefit from similar isolation, even if only for initial checkout and static analysis.
For those running private hosting infrastructure, this is a reminder that Git security patches matter as much as any kernel or OpenSSL update. Automate your patch deployment, test it in staging, and roll it out promptly when security fixes land.

