
Git 2.56.1 Vulnerabilities: Recursive Clones Can Run Code
Enterprise Developer PlatformsA malicious repository can make Git run attacker-controlled code during a recursive clone, one of six vulnerabilities fixed in Git 2.56.1 and backports to six older release lines. Developer workstations are exposed, but GitHub’s advisory points at a wider surface: CI runners, hosting services and any tool that clones, merges or patches repositories on someone else’s behalf.
What Happened
GitHub’s announcement, written by Staff Software Engineer Elijah Newren, says the fixes ship 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. GitHub has deployed fixes across github.com, GitHub Enterprise Cloud and Enterprise Cloud with data residency. GitHub Enterprise Server fixes are in 3.19.15, 3.20.11, 3.21.9 and 3.22.4, and patched Git is coming to GitHub Desktop, the Copilot app, Codespaces and Actions.
Why It Matters
The most serious bug, CVE-2026-111760, is an integer truncation in Git’s index handling. An extremely long path can pass validation under one name and then be written under a shorter one. An attacker uses that gap to replace a submodule’s .git file with a symbolic link to a directory holding malicious configuration or hooks, which Git can then execute during a recursive clone. The fix rejects overlong index paths before they can be truncated.
The other five share a theme: inputs that are trusted too far.
- CVE-2026-113408: when cloning an empty repository over protocol v2, a server can advertise a HEAD pointing to an unborn branch with path-traversal components, letting a later update write outside the reference directory.
- CVE-2026-114467: Git assumed at most two GPG signatures when stripping them; merging a tag with more can corrupt the stack, and hosting services that perform such merges can be affected.
- CVE-2026-114469: the roughly 1 GiB patch size limit checked only the compressed binary patch, so a small patch could expand past it and trigger an out-of-bounds read.
- CVE-2026-105437: a size calculation for very large merges can overflow, causing heap corruption for services that merge untrusted content as well as local merges.
- CVE-2026-114466: three git fast-import features could read arbitrary files or write to files; they now require
--allow-unsafe-features.
What This Means for Builders
Platform teams have more copies of Git than they think. GitHub tells administrators to update Git “used by automation and services that process repositories on behalf of users,” and to update applications that bundle their own Git. In practice, that likely includes self-hosted CI runner images, container base images, merge bots, code-review services and AI coding agents that clone repositories they did not choose.
Until every copy is patched, GitHub’s interim advice is to clone only from trusted servers, avoid recursive clones of untrusted repositories, and avoid merging untrusted tags or processing binary patches and fast-import streams from untrusted sources. GitHub is explicit that these precautions “do not replace installing the fixes.” Stack Archive’s recipe for securing GitHub Actions CI dependencies covers pinning the rest of the pipeline the same way.
The So What
Platform and DevSecOps teams should inventory every Git binary in their estate this week, including runner images, base images and tools that bundle Git, and move each to 2.56.1 or the patched release for its series. GitHub Enterprise Server admins should upgrade to the fixed 3.19 to 3.22 releases, and any service that recursively clones user-supplied repositories should disable recursion until it is patched.
Source: The GitHub Blog
Content created with AI assistance and reviewed for accuracy.
Join the conversation
Stack Insiders is our free community for readers who want to go deeper — share resources, ask questions, and connect with others across every vertical we cover.
Join Stack Insiders →