Skip to main content
LeoNex News

New Git security vulnerabilities: who is affected and how to patch

Illustration: New Git security vulnerabilities: who is affected and how to patch
In this article

The Git project has released fixes for six security vulnerabilities, including arbitrary code execution when recursively cloning a malicious repository, unintended file writes, and memory corruption when handling merges or binary patches. The fix is in Git 2.56.1, with backports for older maintenance lines. This article summarizes each vulnerability, how Git addresses it, and what developers should do.

CVE-2026-111760 allows code execution during a recursive clone. Git normally checks paths before writing files to the working tree, but an integer truncation bug in index handling lets an extremely long path pass the check under one name and then be written under a shorter one. An attacker can exploit this to replace a submodule's .git file with a symbolic link pointing to a directory containing malicious configuration or hooks, so that the attacker's code can run during a recursive clone. The patch rejects overly long index paths before the length is truncated.

CVE-2026-113408 involves path traversal. When cloning an empty repository over protocol v2, the server can advertise a HEAD symref pointing to a branch that has no commits yet, and Git previously did not validate the target of this symref before storing it locally. A malicious server can supply a name containing path-traversal components; with the files reference backend, a subsequent branch update can then write outside the intended refs directory. Git now validates the advertised target, and also validates other reference names and symbolic-reference targets received over protocol v2.

Memory corruption in signature, binary patch and merge handling

The three vulnerabilities in this group all cause memory corruption or out-of-bounds reads.

  • CVE-2026-114467: when stripping GPG signatures from a message, Git assumes there are at most two signatures. A specially crafted message with more than two signatures can make Git write past the end of a fixed-size stack array. The bug can be triggered by merging a tag that contains more than two signatures, causing memory corruption and possibly denial of service; hosting services that perform merges on behalf of users may also be affected. The patch removes the fixed-size array and handles any number of signatures.

  • CVE-2026-114469: Git rejects patches larger than about 1 GiB because the patch-applying code does not safely handle larger input. However, this check only considers the patch size as supplied. Binary patches are compressed and encoded, so a small patch can still expand beyond the limit, bypass the check, and cause an out-of-bounds read that crashes Git. Git now also checks the declared decompressed size before processing a binary patch.

  • CVE-2026-105437: the merge engine calculates how much memory the result needs before writing output, and this calculation can overflow when the result is very large, including when many conflicts combine with a large conflict-marker-size attribute. The overflow makes Git allocate a buffer that is too small and then write beyond it, corrupting heap memory. Applications, hosting services that merge untrusted content, and local merges are all affected. The fix uses a sufficiently large data type, performs overflow-checked arithmetic, and rejects merges whose output size cannot be represented safely.

Filesystem access through fast-import and hardening measures

The git fast-import command reads a stream of commands to build a repository. Some commands can access files outside the repository, so Git has restricted them when they appear in untrusted input streams. With CVE-2026-114466, three features were missing this protection: rewrite-submodules-from and rewrite-submodules-to can read arbitrary files, with contents potentially leaked through error messages, while the export-pack-edges option can create files or append data to existing ones.

These features are now rejected when they come from the input stream, unless the caller explicitly enables --allow-unsafe-features. Enable that option only if you trust the program that generates the stream. The release also adds overflow checks for the relevant index-entry allocations during checkout and tree processing. These checks complement the path-length limit, preventing allocation sizes from being truncated or overflowing before Git copies paths into memory.

What to do: update and temporary mitigations

Updating is the most effective protection. Install the patched build from your operating system or Git distributor, and update applications that bundle their own copy of Git. Administrators should also update Git on automation systems and on services that process repositories on behalf of users.

If you cannot update right away, the source suggests the following temporary measures; they are not a substitute for installing the patch.

  • Clone only from trusted servers.

  • Avoid recursively cloning untrusted repositories.

  • Avoid merging untrusted content or tags.

  • Avoid processing binary patches or fast-import streams from untrusted sources.

Key takeaways

More in Technology Insights

Illustration: Next.js information leak via "use cache" (CVE-2026-119790)
TECH Technology Insights

Next.js information leak via "use cache" (CVE-2026-119790)

A Moderate-severity vulnerability in Next.js allows cached data for one root param value to be returned to requests belonging to a different root param value. The bug appears when the same 'use cache' function is called both directly during render and through unstable_cache(), and that function reads a root param. The cause…

3 min read

Illustration: Q3 2026 DDoS report: many small "swarms", fewer big blows
TECH Technology Insights

Q3 2026 DDoS report: many small "swarms", fewer big blows

Short, medium-intensity, high-volume attacks, a hallmark of rented DDoS services (booters), accelerated this quarter. The main targets were computer software, gambling and casinos, and the information technology sector. Compared with the same period in 2025, network-layer attacks rose 208%, of which…

3 min read

Email newsletter

Receive a selection of new LeoNex News articles by email.

We only use this address to send the newsletter.

Receive a selection of new LeoNex News articles by email. You will receive a confirmation email; the subscription only takes effect after you confirm. Every email includes an unsubscribe link. Read the privacy policy