The Git project this week released fixes for a critical vulnerability tracked as CVE-2026-111760 that lets a malicious repository execute arbitrary attacker code on systems performing recursive clones with submodules.
The flaw stems from an integer truncation issue in how Git processes its index. An extremely long path can evade existing safety checks yet be written to disk under a truncated name that an attacker can craft to match .git. Because a freshly cloned submodule uses a .git file rather than a directory, this file can be replaced with a symbolic link pointing to a folder containing malicious hooks or configuration files. Once Git processes the submodule, the attacker's code executes at defined hook points.
Patches appear in Git 2.56.1 and corresponding releases for earlier branches: 2.50.2, 2.51.3, 2.52.1, 2.53.1, 2.54.1 and 2.55.1. The updated versions reject excessively long paths before truncation can occur. GitHub has already deployed the fixes to github.com and GitHub Enterprise Cloud, with GitHub Enterprise Server versions 3.19.15, 3.20.11, 3.21.9 and 3.22.4 also updated. Fixed builds of GitHub Desktop and the GitHub Copilot app are in preparation, and GitHub Codespaces plus GitHub Actions will receive the corrected Git version.
Git for Windows had not yet published a build based on 2.56.1 as of the latest check. Until patches are installed, GitHub advises cloning only from trusted servers, avoiding recursive clones of untrusted repositories, and refraining from merging untrusted content, tags, binary patches or fast-import streams.
The same releases address five additional issues. CVE-2026-113408 allows a malicious server to send a path-traversal branch name over Git protocol v2 that can later write outside the reference directory. CVE-2026-114467 causes stack memory corruption and denial of service when merging a tag with more than two GPG signatures. CVE-2026-114469 lets an oversized binary patch bypass the 1 GiB limit and trigger an out-of-bounds read. CVE-2026-105437 enables heap memory corruption during very large merges that use a high conflict-marker-size attribute. CVE-2026-114466 permits three fast-import features to read or write arbitrary files unless the --allow-unsafe-features flag is set.
GitLab noted that servers running git merge-tree to evaluate pull or merge requests are particularly exposed to CVE-2026-105437 when a repository contains a malicious .gitattributes file. Servers unable to upgrade immediately can add conflict-marker-size=7 to info/attributes or disable merge checks for untrusted repositories.


