Playbooks · Coding tasks
Git 2.56.1: patch the recursive-clone bug
Written November 11, 2026
Six vulnerabilities in Git, and the worst needs only a recursive clone of a malicious repository to run attacker code. The fix is a version bump: 2.56.1, or the patched release for your maintenance series. Windows installers are published now.
The worst bug: code execution on recursive clone
Git checks paths before writing files into a working tree, including rejecting paths that would overwrite its own repository metadata. But an integer truncation in Git's index handling can let an extremely long path pass validation under one name and then be written using a shorter name. An attacker can use that mismatch to replace a submodule's .git file with a symbolic link pointing to a directory containing malicious configuration or hooks. When Git then uses that directory, it can execute attacker-controlled code during a recursive clone. That is CVE-2026-111760, and the GitHub announcement lists it first among the six. The advisory notes it can only be triggered when --recurse-submodules is used, and the fix rejects extremely long index entry paths before their lengths can be truncated. The release also adds overflow checks to related index entry allocations during checkout and tree processing.
The trigger matters because cloning is the most common command in the job, and recursive clone is the default reflex whenever a repository has submodules. The malicious repository does not need to be on a forge — it only needs to be cloned.
The other five
- CVE-2026-113408 — path traversal through a server's advertised HEAD. Cloning an empty repository over protocol v2, a malicious server could advertise a
HEADsymref pointing to an unborn branch with path-traversal components, and a later branch update could write outside the intended reference directory. Git now validates the advertised target before accepting it. - CVE-2026-114467 — stack corruption when removing signatures. Stripping GPG signatures assumed at most two signatures; a message with more could write past a fixed-size stack array. Triggered by merging a tag with more than two signatures. The fix removes the fixed-size array.
- CVE-2026-114469 — out-of-bounds reads when applying binary patches. Git rejected patches over about 1 GiB, but the check only looked at the patch size as supplied; a small compressed binary patch can expand past the limit and crash Git. Git now also checks the declared uncompressed size.
- CVE-2026-105437 — heap corruption during large merges. The merge-size calculation could overflow on very large merges, including many conflicts combined with a large
conflict-marker-size, allocating a buffer too small and writing past it. The fix uses size-appropriate types and checked arithmetic. - CVE-2026-114466 — filesystem access through fast-import streams. Three features lacked the restrictions that already applied to other file-accessing commands in untrusted input streams:
rewrite-submodules-fromandrewrite-submodules-tocould read arbitrary files, andexport-pack-edgescould create or append to files. They are now rejected in untrusted streams unless the caller passes--allow-unsafe-features— enable that only when the program generating the stream is trusted.
What to install
The fixes are in Git 2.56.1, with backports to 2.55.1, 2.54.1, 2.53.1, 2.52.1, 2.51.3, and 2.50.2. Update to 2.56.1 or the patched release for your maintenance series, and update any applications that bundle Git — an IDE, a desktop client, or a CI runner with its own copy does not get fixed by updating the Git on your path alone. GitHub.com is already patched, and GitHub Enterprise Server updates are available in 3.19.15, 3.20.11, 3.21.9, and 3.22.4. GitHub Desktop, the GitHub Copilot app, Codespaces, and GitHub Actions are receiving patched versions as well.
On Windows, the Git for Windows 2.56.1 installers are published: the releases page lists 64-bit and Arm64 installers with SHA-256 hashes. They arrived after the Git release itself — the Windows build follows the Git release by a short lag, so if the installer was missing when the announcement landed, check the releases page again rather than assuming it is still missing. After updating, confirm with git --version; it should read 2.56.1 (or your series' patched release).
If you cannot update immediately
Clone only from trusted servers, and avoid recursive clones of untrusted repositories. Avoid merging untrusted content or tags, and avoid processing binary patches or fast-import streams from untrusted sources. Those precautions reduce the exposure; they do not replace installing the fixes.
The call
Patch now. The worst bug needs only a recursive clone of a malicious repository, the fix is a version bump, and the backports cover every maintained series. There is no judgment call to make here — update Git, then update the tools that bundle it.
Related playbooks
- Audit a repository's git config before any agent opens it
- Patch your MCP reference servers now
- Manage Git worktrees for parallel AI agents with Worktrunk
- Fix a bug with an agent without breaking the test suite
Sources
- Git security vulnerabilities announced — GitHub Blog
- Recursive clones are susceptible to Remote Code Execution — GitHub Security Advisory
- Releases — git-for-windows/git — GitHub
Back to: Coding playbooks hub · Also: Dependabot now updates agent package managers · Dependabot pauses alerts on quiet repos · AWS MCP server let deny lists silently fail