CVE-2026-105437Heap-based Buffer Overflow in Git
Affected versions of Git have a heap buffer overflow in the three-way merge code (xdiff), which an attacker can trigger through a repository they control. When Git merges a file, it first adds up the size of the merged output, allocates a buffer of that size, and then writes the output into it. That total was kept in a 32-bit signed integer. The conflict-marker-size attribute, which can be set from a committed .gitattributes file, accepts any positive integer, and the markers are written several times for every conflict. A small file with a huge marker size and many separate conflicts can therefore push the total past 4 GiB, so the integer wraps to a small value and Git writes attacker-controlled merge output past the end of a buffer that is too small. At minimum this crashes Git, and because the overflow is large and its contents are largely attacker-controlled, worse heap corruption is possible. Any command that does a textual three-way merge can trigger it, such as git-merge(1), git-rebase(1), git-cherry-pick(1), and git-merge-tree(1). The latter is most likely a target for Git forges, which might use git-merge-tree(1) on the server-side to check mergeability. When the server reads attributes from trees in the repository (for example through attr.tree or --attr-source), any user who can push branches and request that they be merged (for example by opening a pull or merge request) can trigger the overflow without anyone else doing anything, and the data they push is small because the oversized output only appears during the merge. The problem has been patched by computing the size as size_t and checking every addition for overflow, so Git stops with an error instead of overflowing. Servers that cannot upgrade right away can add * conflict-marker-size=7 to each repository's info/attributes as a workaround, which overrides any in-tree .gitattributes, or turn off server-side mergeability checks for untrusted repositories.
What to do
Fixed builds are available from Alpine: see the table below for the fixed version per release.
Debian, Red Hat, Ubuntu have not shipped a fix for every release yet.
Is your server affected? One read-only command checks every installed package against this CVE and all others, using each vendor's fixed versions. Get started or get a free API key.
curl -sS "https://api.cvefocus.com/v1/check?format=text" -H "Authorization: Bearer $CVEFOCUS_KEY" \ -H "Content-Type: text/plain" --data-binary @inventory.txt
Vendor status at a glance
Status by vendor and release
From each vendor's own security data and VEX statements. "Fixed" means a fixed build is published for that release.
| Release | Package | Status | Fixed version | Advisory |
|---|---|---|---|---|
| Ubuntu 26.10 | git | Fix pending | UBUNTU-CVE-2026-105437 | |
| Ubuntu 26.04 | git | Under investigation | UBUNTU-CVE-2026-105437 | |
| Ubuntu 24.04 | git | Under investigation | UBUNTU-CVE-2026-105437 | |
| Ubuntu 22.04 | git | Under investigation | UBUNTU-CVE-2026-105437 | |
| Ubuntu 20.04 | git | Fix pending | UBUNTU-CVE-2026-105437 | |
| Ubuntu 18.04 | git | Fix pending | UBUNTU-CVE-2026-105437 | |
| Ubuntu 16.04 | git | Fix pending | UBUNTU-CVE-2026-105437 | |
| Debian 14 | git | Fix pending | DEBIAN-CVE-2026-105437 | |
| Debian 13 | git | Fix pending | DEBIAN-CVE-2026-105437 | |
| Debian 12 | git | Fix pending | DEBIAN-CVE-2026-105437 | |
| Red Hat Enterprise Linux 10 | git | Fix pending Affected | ||
| Red Hat Enterprise Linux 10 | git-all | Fix pending Affected | ||
| Red Hat Enterprise Linux 10 | git-core | Fix pending Affected | ||
| Red Hat Enterprise Linux 10 | git-core-doc | Fix pending Affected | ||
| Red Hat Enterprise Linux 10 | git-credential-libsecret | Fix pending Affected | ||
| Red Hat Enterprise Linux 10 | git-daemon | Fix pending Affected | ||
| Red Hat Enterprise Linux 10 | git-email | Fix pending Affected | ||
| Red Hat Enterprise Linux 10 | git-gui | Fix pending Affected | ||
| Red Hat Enterprise Linux 10 | git-instaweb | Fix pending Affected | ||
| Red Hat Enterprise Linux 10 | git-subtree | Fix pending Affected | ||
| Red Hat Enterprise Linux 10 | git-svn | Fix pending Affected | ||
| Red Hat Enterprise Linux 10 | gitk | Fix pending Affected | ||
| Red Hat Enterprise Linux 10 | gitweb | Fix pending Affected | ||
| Red Hat Enterprise Linux 10 | perl-Git | Fix pending Affected | ||
| Red Hat Enterprise Linux 10 | perl-Git-SVN | Fix pending Affected | ||
| Red Hat Enterprise Linux 9 | git | Fix pending Affected | ||
| Red Hat Enterprise Linux 9 | git-all | Fix pending Affected | ||
| Red Hat Enterprise Linux 9 | git-core | Fix pending Affected | ||
| Red Hat Enterprise Linux 9 | git-core-doc | Fix pending Affected | ||
| Red Hat Enterprise Linux 9 | git-credential-libsecret | Fix pending Affected | ||
| Red Hat Enterprise Linux 9 | git-daemon | Fix pending Affected | ||
| Red Hat Enterprise Linux 9 | git-email | Fix pending Affected | ||
| Red Hat Enterprise Linux 9 | git-gui | Fix pending Affected | ||
| Red Hat Enterprise Linux 9 | git-instaweb | Fix pending Affected | ||
| Red Hat Enterprise Linux 9 | git-subtree | Fix pending Affected | ||
| Red Hat Enterprise Linux 9 | git-svn | Fix pending Affected | ||
| Red Hat Enterprise Linux 9 | gitk | Fix pending Affected | ||
| Red Hat Enterprise Linux 9 | gitweb | Fix pending Affected | ||
| Red Hat Enterprise Linux 9 | perl-Git | Fix pending Affected | ||
| Red Hat Enterprise Linux 9 | perl-Git-SVN | Fix pending Affected | ||
| Red Hat Enterprise Linux 8 | git | Fix pending Affected | ||
| Red Hat Enterprise Linux 8 | git-all | Fix pending Affected | ||
| Red Hat Enterprise Linux 8 | git-core | Fix pending Affected | ||
| Red Hat Enterprise Linux 8 | git-core-doc | Fix pending Affected | ||
| Red Hat Enterprise Linux 8 | git-credential-libsecret | Fix pending Affected | ||
| Red Hat Enterprise Linux 8 | git-daemon | Fix pending Affected | ||
| Red Hat Enterprise Linux 8 | git-email | Fix pending Affected | ||
| Red Hat Enterprise Linux 8 | git-gui | Fix pending Affected | ||
| Red Hat Enterprise Linux 8 | git-instaweb | Fix pending Affected | ||
| Red Hat Enterprise Linux 8 | git-subtree | Fix pending Affected | ||
| Red Hat Enterprise Linux 8 | git-svn | Fix pending Affected | ||
| Red Hat Enterprise Linux 8 | gitk | Fix pending Affected | ||
| Red Hat Enterprise Linux 8 | gitweb | Fix pending Affected | ||
| Red Hat Enterprise Linux 8 | perl-Git | Fix pending Affected | ||
| Red Hat Enterprise Linux 8 | perl-Git-SVN | Fix pending Affected | ||
| Red Hat Enterprise Linux 7 | emacs-git | Fix pending Affected | ||
| Red Hat Enterprise Linux 7 | emacs-git-el | Fix pending Affected | ||
| Red Hat Enterprise Linux 7 | git | Fix pending Affected | ||
| Red Hat Enterprise Linux 7 | git-all | Fix pending Affected | ||
| Red Hat Enterprise Linux 7 | git-bzr | Fix pending Affected | ||
| Red Hat Enterprise Linux 7 | git-cvs | Fix pending Affected | ||
| Red Hat Enterprise Linux 7 | git-daemon | Fix pending Affected | ||
| Red Hat Enterprise Linux 7 | git-email | Fix pending Affected | ||
| Red Hat Enterprise Linux 7 | git-gnome-keyring | Fix pending Affected | ||
| Red Hat Enterprise Linux 7 | git-gui | Fix pending Affected | ||
| Red Hat Enterprise Linux 7 | git-hg | Fix pending Affected | ||
| Red Hat Enterprise Linux 7 | git-instaweb | Fix pending Affected | ||
| Red Hat Enterprise Linux 7 | git-p4 | Fix pending Affected | ||
| Red Hat Enterprise Linux 7 | git-svn | Fix pending Affected | ||
| Red Hat Enterprise Linux 7 | gitk | Fix pending Affected | ||
| Red Hat Enterprise Linux 7 | gitweb | Fix pending Affected | ||
| Red Hat Enterprise Linux 7 | perl-Git | Fix pending Affected | ||
| Red Hat Enterprise Linux 7 | perl-Git-SVN | Fix pending Affected | ||
| Red Hat Enterprise Linux 6 | emacs-git | Fix pending Affected | ||
| Red Hat Enterprise Linux 6 | emacs-git-el | Fix pending Affected | ||
| Red Hat Enterprise Linux 6 | git | Fix pending Affected | ||
| Red Hat Enterprise Linux 6 | git-all | Fix pending Affected | ||
| Red Hat Enterprise Linux 6 | git-cvs | Fix pending Affected | ||
| Red Hat Enterprise Linux 6 | git-daemon | Fix pending Affected | ||
| Red Hat Enterprise Linux 6 | git-email | Fix pending Affected | ||
| Red Hat Enterprise Linux 6 | git-gui | Fix pending Affected | ||
| Red Hat Enterprise Linux 6 | git-svn | Fix pending Affected | ||
| Red Hat Enterprise Linux 6 | gitk | Fix pending Affected | ||
| Red Hat Enterprise Linux 6 | gitweb | Fix pending Affected | ||
| Red Hat Enterprise Linux 6 | perl-Git | Fix pending Affected | ||
| Alpine Linux 3.24 | git | Fixed | 2.54.1-r0 | ALPINE-CVE-2026-105437 |
| Alpine Linux 3.23 | git | Fixed | 2.52.1-r0 | ALPINE-CVE-2026-105437 |
What the vendor says
As published in the CVE record by GitLab, the CVE's assigner (usually the vendor). Check the vendor's advisory before acting.
- Git: affected: before 2.49.1, 2.50.0-rc0 to before 2.50.2, 2.51.0-rc0 to before 2.51.3, 2.52.0-rc0 to before 2.52.1, 2.53.0-rc0 to before 2.53.1, 2.54.0-rc0 to before 2.54.1; fixed in
2.49.1,2.50.2,2.51.3,2.52.1,2.53.1,2.54.1
Solution: Upgrade to versions 2.50.2, 2.51.3, 2.52.1, 2.53.1, 2.54.1, 2.55.1, 2.56.1 or above.
References
- https://gitlab.com/gitlab-org/git/-/work_items/814
- https://gitlab.com/gitlab-org/gitlab/-/work_items/632121
- https://hackerone.com/reports/4044249
About this page
Compiled by CVEfocus from the CVE List, the security data and VEX statements of Ubuntu, Debian, Red Hat, AlmaLinux, Rocky Linux and Microsoft, CISA's Known Exploited Vulnerabilities catalog and FIRST EPSS, refreshed several times a day (data status). Information only; see the disclaimer. Official record: cve.org · NVD.