· via GitHub Blog
Git 2.56.1 and backports fix six vulnerabilities including code execution in clones
The Git project has fixed six security flaws spanning recursive clones, merges, binary patches and fast-import, with the worst enabling code execution from a malicious repository. Users should move to Git 2.56.1 or a patched backport.

The Git project has shipped security updates fixing six vulnerabilities, ranging from crashes and memory corruption to one bug that lets a hostile repository run code on the machine of anyone who clones it recursively. According to the GitHub Blog, which announced the release, the fixes are included in Git 2.56.1, with backports to Git 2.55.1, 2.54.1, 2.53.1, 2.52.1, 2.51.3 and 2.50.2.
Code execution through recursive clones
The most severe issue, CVE-2026-111760, sits in how Git validates paths before writing files into a working tree. An integer truncation in index handling means an extremely long path can pass validation under one name and then be written under a shorter name. According to the GitHub Blog, an attacker can exploit that mismatch to replace a submodule's .git file with a symbolic link into a directory with attacker-chosen configuration or hooks, which Git may then execute during a recursive clone. The patched release now refuses index entry paths long enough for their sizes to be truncated.
Malicious servers and crafted tags
CVE-2026-113408 concerns the clone handshake over protocol v2. When cloning an empty repository, the server can advertise a HEAD symref pointing at an unborn branch, and Git previously stored the target without checking it. A malicious server could advertise a name containing path traversal so that, with the files reference backend, a later branch update writes to locations outside the reference directory. Git now validates the advertised target, along with other reference names and symref targets received through protocol v2.
A second flaw, CVE-2026-114467, is a stack corruption bug in signature handling. When stripping GPG signatures, Git assumed a message would carry at most two; a crafted message with more causes writes past the end of a fixed-size stack array. Merging a tag carrying more than two signatures is enough to trigger it, causing memory corruption and a potential denial of service. The GitHub Blog notes that hosting services performing such merges on behalf of users are also exposed. The fix removes the fixed-size array and processes messages no matter how many signatures they contain.
Memory corruption in patches and merges
CVE-2026-114469 affects binary patch application. Git rejects patches larger than roughly 1 GiB, but the check only measured the patch as supplied. Because binary patches are compressed and encoded, a small input can expand beyond the limit, bypass the size check and cause an out-of-bounds read that crashes Git. The patched release also inspects the declared uncompressed size before processing.
CVE-2026-105437 affects the merge machinery, which calculates how much memory a merge result needs before writing output. That calculation can overflow when the result is very large, for example when a large number of conflicts coincides with a big conflict-marker-size attribute. Git may then allocate a buffer that is too small and write past it, corrupting heap memory. Both local merges and services merging untrusted content are affected. The fix uses size-appropriate types and checked arithmetic, and rejects merges whose output size falls outside what those types can safely represent.
Locking down fast-import
The final vulnerability, CVE-2026-114466, involves git fast-import, which builds repositories from a command stream. Some commands can already touch files outside the repository, so Git restricts them in untrusted streams, but three features lacked that protection. rewrite-submodules-from and rewrite-submodules-to are able to read files anywhere on the filesystem and potentially reveal their contents through error messages, while export-pack-edges can create new files or append to existing ones. These features are now rejected when supplied through the input stream unless the caller explicitly passes --allow-unsafe-features, an option the GitHub Blog says should only be used when the program generating the stream is trusted.
Platform updates and extra hardening
Alongside the CVE fixes, the release adds overflow checks to related index entry allocations during checkout and tree processing, so that size calculations cannot silently wrap before Git copies a path into memory.
GitHub reports that it has already deployed fixes across github.com, GitHub Enterprise Cloud and its data-residency variant. GitHub Enterprise Server patches are available in versions 3.19.15, 3.20.11, 3.21.9 and 3.22.4, and coordinated updates carrying patched Git are on the way for GitHub Desktop, the GitHub Copilot app, Codespaces and Actions.
Why it matters
Most of these bugs require only contact with hostile content — an untrusted repository, tag, patch or import stream — which is everyday traffic for developers, forges and CI systems. Several directly threaten hosting services that merge or process user-supplied content, and the worst of the six yields code execution from a single recursive clone. Updating Git, plus every application and automation pipeline that bundles its own copy, is the only complete remedy. Until that happens, the GitHub Blog advises restricting clones to servers you trust, skipping recursive clones of unfamiliar repositories, and avoiding untrusted merges, binary patches and fast-import streams.
- #git
- #security
- #version-control
- #open-source
- #vulnerabilities