Git Patches CVE-2026-111760 Recursive Clone Flaw

The Git project has released Git 2.56.1 to fix a flaw that could let a malicious repository run an attacker’s code on a computer that clones it recursively, along with its submodules. The flaw is tracked as CVE-2026-111760, and matching fixes have been released for the 2.50 to 2.55 maintenance series.
Git is the version-control software used by developers around the world to store and share code. Because it runs on millions of computers, a flaw in how it handles a cloned repository can put a very large number of machines at risk.
How the CVE-2026-111760 flaw works
The flaw is an integer truncation in how Git handles its index, the internal list of files in a repository. An extremely long file path in a repository can pass Git’s safety check under one name, but Git then writes it to disk under a shorter name that an attacker can set to .git.
That matters because of how submodules work. Git refuses to replace a .git folder with a symbolic link, but in a freshly cloned submodule, .git is a file rather than a folder. An attacker can therefore replace that file with a symbolic link pointing to a folder holding malicious hooks or configuration.
Hooks are small programs that Git runs automatically at set points, such as when code is checked out. Once Git starts using the attacker’s folder, the malicious code can run on the victim’s computer. The attack only works when the victim clones a malicious repository recursively, which is why the flaw is tied to recursive clones.
Which versions are fixed
The fix is included in Git 2.56.1, with backports in 2.50.2, 2.51.3, 2.52.1, 2.53.1, 2.54.1 and 2.55.1. The fixed versions reject extremely long paths before their length can be cut short. Users should install a fixed version from their operating system or Git distributor, and update any application that ships its own copy of Git.
GitHub, which ships Git in its own tools, said it has already applied the fixes to github.com and GitHub Enterprise Cloud. For GitHub Enterprise Server, the fixes are in versions 3.19.15, 3.20.11, 3.21.9 and 3.22.4. Fixed versions of GitHub Desktop and the GitHub Copilot app are being prepared, and GitHub Codespaces and GitHub Actions will also receive the fixed Git. Git for Windows had not yet released a version based on Git 2.56.1 as of Tuesday evening.
Five more flaws fixed in the same release
The release fixes five further vulnerabilities. CVE-2026-113408 lets a malicious server send a branch name containing path traversal when someone clones an empty repository over Git protocol v2. CVE-2026-114467 can corrupt Git’s stack memory when a tag carrying more than two GPG signatures is merged, causing a denial of service.
CVE-2026-114469 involves a binary patch that expands to a very large size and crashes Git with an out-of-bounds read. CVE-2026-105437 can make Git write past the end of a buffer during a very large merge, corrupting heap memory; code-hosting servers are most likely to be targeted through the git merge-tree command. CVE-2026-114466 covers three git fast-import features that could be used to read arbitrary files or create files, and Git now rejects them in an input stream unless the caller sets the --allow-unsafe-features flag.
What to do until you update
Until a fixed version is installed, GitHub suggests cloning only from servers you trust, and not recursively cloning repositories you do not trust. Users should also avoid merging content or tags from untrusted sources, and should not process binary patches or fast-import streams from sources they do not trust. Those steps reduce the risk, but they do not replace installing the fixes.