Git security vulnerabilities: six fixes in 2.56.1
The Git project released fixes for six security flaws, including possible code execution during recursive clones and memory corruption during merges. The GitHub Blog recommends updating to Git 2.56.1 or the patched release for your…
Git released updates that address six security vulnerabilities that can lead to code execution, file writes outside expected locations, and memory corruption. According to the GitHub Blog, the fixes are included in Git 2.56.1, and backports are available for several maintenance releases. The post recommends installing 2.56.1 or the suitable patched release and updating applications that bundle Git.
What the reported vulnerabilities are
The announcement describes six distinct problems.
CVE-2026-111760, code execution during recursive clones: an integer truncation in index handling could let an attacker present an extremely long path that passes validation under one name but is written under a shorter name. That discrepancy can let an attacker replace a submodule .git file with a symbolic link to a directory containing malicious configuration or hooks, leading to code execution during a recursive clone. The fix rejects extremely long index entry paths before truncation can occur.
CVE-2026-113408, path traversal in protocol v2 HEAD: when cloning an empty repository over Git protocol v2, a server can advertise a HEAD symref that points to an unborn branch. Git previously did not validate that target before storing it locally. A malicious server could supply a name with path-traversal parts, and with the files reference backend, a later update could write outside the intended reference directory. The release adds validation of advertised targets and other reference names received over protocol v2.
CVE-2026-114467, stack corruption when removing signatures: Git assumed at most two GPG signatures in a message. A specially crafted message with more than two signatures could write past the end of a fixed-size stack array. This can be triggered by merging a tag containing many signatures, causing memory corruption and a potential denial of service. The fix removes the fixed-size array and accepts any number of signatures safely.
CVE-2026-114469, out-of-bounds read from binary patches: Git rejects patches larger than about 1 GiB, but that limit considered only the supplied patch size. Compressed, encoded binary patches can expand beyond that limit, so a crafted patch could bypass the check and cause an out-of-bounds read and crash. The update also checks the declared uncompressed size before processing a binary patch.
CVE-2026-105437, heap corruption during very large merges: merge code computed memory needs using types and arithmetic that could overflow when the merge result is extremely large, for example when many conflicts combine with a large conflict-marker-size. An overflow could make Git allocate too-small buffers and write past them, corrupting heap memory. The fix uses size-appropriate types and checked arithmetic and rejects merges whose output size cannot be represented safely.
CVE-2026-114466, filesystem access through fast-import streams: git fast-import reads commands to build a repository, and some commands can already access files outside the repository. Three features lacked protection in untrusted input streams: rewrite-submodules-from, rewrite-submodules-to, and export-pack-edges. These could read arbitrary files or create or append to files. The release rejects those features in input streams unless the caller enables --allow-unsafe-features explicitly.
The release also adds extra overflow checks to index entry allocations used during checkout and tree processing, to prevent size truncation or allocation overflows before copying a path into memory.
Why Git security vulnerabilities matter to small teams and public services
The GitHub Blog points out that these issues can affect local Git clients, applications that bundle Git, hosting services, and automation that process repositories on behalf of users. That means a site or tool that performs recursive clones, merges, or fast-import processing on content from untrusted sources can be impacted. Memory corruption and out-of-bounds reads can cause crashes or worse, and path or reference handling bugs can let a remote server influence files written on the client.
For organizations that use hosted Git platforms or run their own Git servers, the announcement also notes that GitHub has deployed fixes across github.com, GitHub Enterprise Cloud, and related hosting. Updated GitHub Enterprise Server releases are available.
What to do now, practical steps
- Update Git installations to Git 2.56.1, or install the patched release for your maintenance series. The GitHub Blog lists backports for multiple releases.
- Update any applications or services that bundle their own copy of Git, including automation that processes repositories for you.
- For administrators, install the available updates for GitHub Enterprise Server as listed in the announcement.
- If you cannot update immediately, treat untrusted sources as risky: clone only from servers you trust, avoid recursive clones of untrusted repositories, and do not merge untrusted content or tags.
- Do not process binary patches or fast-import streams from untrusted sources, and only enable --allow-unsafe-features when you trust the program generating the stream.
If you need help updating sites that run WordPress or Formidable Forms, Running WordPress or Formidable Forms? Get help from a Formidable Masterminds developer.
How the fixes work, briefly
The patches follow a few patterns: reject unsafe inputs earlier, validate more names and targets received over protocol v2, remove fixed-size stack buffers and accept arbitrary numbers of signatures, check declared uncompressed sizes before processing binary patches, and use size-aware types with checked arithmetic when calculating allocation sizes. Together these changes reduce the ways malformed or malicious repository data can cause out-of-bounds reads, heap corruption, or unexpected file writes.
A short checklist for maintainers
- Schedule updates to Git and any bundled copies in your stack.
- Patch automation and CI that perform recursive clones, merges, or fast-import operations.
- Review policies about accepting fast-import streams and enable unsafe features only for trusted sources.
Following the GitHub Blog guidance and installing the patched releases is the most effective protection against these issues, the announcement says.
Sources
- Git security vulnerabilities announced The GitHub Blog
This post was drafted with AI from the reporting linked above and published by The Jones Foundry. For full details, read the original sources.