Six security vulnerabilities have been addressed in new Git releases, spanning issues in recursive cloning operations, reference validation, merge processing, binary patch handling, and fast-import functionality. The vulnerabilities range from arbitrary code execution to memory corruption and denial-of-service conditions.

Patched versions are now available in Git 2.56.1, along with backports to Git 2.55.1, 2.54.1, 2.53.1, 2.52.1, 2.51.3, and 2.50.2. Users are advised to upgrade to Git 2.56.1 or the patched release matching their maintenance series, and to update any applications that embed Git.

Vulnerabilities in Git

CVE-2026-111760: Code execution during recursive clones

Git validates paths before writing to a working tree, including checks to prevent overwriting repository metadata. An integer truncation flaw in Git's index handling allows an extremely long path to pass validation under one name but be written using a truncated shorter name.

An attacker can exploit this discrepancy by replacing a submodule's .git file with a symbolic link to a directory holding malicious configuration or hooks. When Git processes that directory during a recursive clone, it can execute attacker-supplied code.

The fix prevents extremely long index entry paths from being processed before their lengths can be truncated.

CVE-2026-113408: Path traversal through a server's advertised HEAD

During cloning of an empty repository using Git protocol v2, a server can advertise a HEAD symref targeting an unborn branch with no commits. Git previously did not validate the symref target before storing it locally.

A malicious server could supply a name containing path-traversal sequences. With the files reference backend, a subsequent branch update operation could write outside the intended reference directory.

The patched version validates the advertised target before accepting it, and also validates other reference names and symbolic-reference targets received through protocol v2.

CVE-2026-114467: Stack corruption when removing signatures

Git's GPG signature stripping logic assumed a maximum of two signatures per message. A specially crafted message with more than two signatures can cause Git to write beyond a fixed-size stack array.

Merging a tag containing more than two signatures can trigger this flaw, resulting in memory corruption and potential denial of service. Hosting platforms that perform merges on behalf of users are also vulnerable.

The fix removes the fixed-size array and processes messages containing any number of signatures.

CVE-2026-114469: Out-of-bounds reads when applying binary patches

Git rejects patches larger than approximately 1 GiB because its patch application code cannot safely handle such inputs. However, this check only examined the patch size as supplied.

Since binary patches are compressed and encoded, a relatively small patch can expand beyond the limit during processing. A crafted patch can bypass the input-size check and trigger an out-of-bounds read, crashing Git.

The patched version now checks the declared uncompressed size before processing a binary patch.

CVE-2026-105437: Heap corruption during large merges

Git's merge machinery pre-calculates memory requirements for a merge result before writing output. This calculation can overflow when the result is very large, particularly when numerous conflicts combine with a large conflict-marker-size attribute.

An overflow can cause Git to allocate an undersized buffer and then write beyond it, corrupting heap memory. This affects applications and hosting services that merge untrusted content, as well as local merge operations.

The fix employs size-appropriate types and checked arithmetic, rejecting merges whose output size cannot be safely represented.

CVE-2026-114466: Filesystem access through fast-import streams

git fast-import processes a stream of commands to construct a repository. Some commands can access files outside the repository, and Git already restricts them in untrusted input streams.

Three additional features lacked this protection. The rewrite-submodules-from and rewrite-submodules-to features can read arbitrary files, potentially exposing their contents through error messages. The export-pack-edges option can create files or append data to existing files.

These features are now rejected when supplied through the input stream unless the caller explicitly enables --allow-unsafe-features. This option should only be enabled when you trust the program generating the stream.

Additional hardening

The release adds overflow checks to related index entry allocations during checkout and tree processing. These checks work alongside the path-length limits, preventing allocation sizes from being truncated or overflowing before Git copies a path into memory.

Protecting GitHub users

  • Fixes have been deployed across github.com, GitHub Enterprise Cloud, and GitHub Enterprise Cloud with data residency.
  • Updates for GitHub Enterprise Server are available in versions 3.19.15, 3.20.11, 3.21.9, and 3.22.4. Administrators are advised to upgrade immediately.
  • GitHub Desktop and the GitHub Copilot app releases will include patched versions of Git.
  • GitHub Codespaces and GitHub Actions will receive patched versions of Git.

Update Git

Upgrading to a patched version is the most effective protection against these vulnerabilities. Install a patched version from your operating system or Git distributor, and update applications that bundle their own copy of Git. Administrators should also update Git installations used by automation and services that process repositories on behalf of users.

If immediate updating is not possible, clone only from trusted servers and avoid recursive clones of untrusted repositories. Refrain from merging untrusted content or tags, or processing binary patches or fast-import streams from untrusted sources. These precautions do not substitute for installing the fixes.