Git releases fixes for recursive clone code-execution flaw

The Git project has fixed CVE-2026-111760, a vulnerability that can allow a malicious repository to execute attacker-controlled code when a victim recursively clones it together with its submodules. The primary update is Git 2.56.1, while supported maintenance releases 2.50.2, 2.51.3, 2.52.1, 2.53.1, 2.54.1 and 2.55.1 carry matching fixes.
The issue lies in Git’s handling of its index. An extremely long path can pass a safety check, but its length can subsequently be truncated when Git writes the path to disk. An attacker can arrange for the shortened name to become .git, creating a path to interfere with submodule metadata during a recursive clone.
How the recursive clone attack works
Git does not replace a .git directory with a symbolic link. In a freshly cloned submodule, however, .git is a file. The flaw could let an attacker replace that file with a symbolic link to a directory containing malicious hooks or configuration.
Git hooks are programs launched at defined points in Git workflows. If Git follows the attacker-controlled location and uses its hooks or configuration, code supplied by the attacker can run on the machine performing the clone. The corrected releases reject the extremely long paths before the length can be truncated.
Updates extend to GitHub services and products
GitHub said it has applied the fixes to github.com and GitHub Enterprise Cloud. GitHub Enterprise Server contains the updates in versions 3.19.15, 3.20.11, 3.21.9 and 3.22.4. Fixed releases of GitHub Desktop and the GitHub Copilot app were still being prepared, while GitHub Codespaces and GitHub Actions were also due to receive the patched Git version.
Organizations should install a fixed Git package from their operating-system vendor or Git distributor and update applications that bundle their own Git executable. A workstation may remain exposed even after its system Git is updated if a development tool ships a separate vulnerable copy.
Five further vulnerabilities addressed
The releases also resolve five additional issues. CVE-2026-113408 concerns path traversal through a malicious branch name sent by a server during an empty clone over Git protocol v2. CVE-2026-114467 can corrupt stack memory when Git merges a tag with more than two GPG signatures, causing denial of service and potentially affecting hosting services that perform such merges.
CVE-2026-114469 can allow an oversized binary patch to evade Git’s roughly 1 GiB patch-size limit and trigger an out-of-bounds read. CVE-2026-105437 can corrupt heap memory during a very large merge with many conflicts and a large conflict-marker-size attribute. GitLab noted that code-hosting servers may be targeted through git merge-tree when checking whether pull or merge requests can be merged.
The final issue, CVE-2026-114466, affects three git fast-import features that could read arbitrary files or create files and append data. Git now rejects those features in an input stream unless --allow-unsafe-features is specified. Until upgrades are complete, GitHub recommends cloning only from trusted servers, avoiding recursive clones of untrusted repositories, and not processing untrusted tags, binary patches or fast-import streams. For businesses, the practical priority is to patch every Git distribution and embedded client while restricting untrusted repository workflows in developer and build environments.

