cve.bz

CVE-2026-105437 git git: Heap-based Buffer Overflow

7.5 highEPSS 0.4%

High (7.5) in git git. EPSS 0.4% estimated probability of exploitation activity in the next 30 days.

On this page
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.

Severity

CVSS 3.1

7.5 high
CVSS:3.1/AV:N/AC:H/PR:N/UI:R/S:U/C:H/I:H/A:H
EPSS
0.4% estimated probability of exploitation activity in the next 30 days; 35th percentile. Scored 2026-11-13. A forecast for this CVE across the internet, not for your own systems.
CWE
CWE-122 Heap-based Buffer Overflow
Published
Modified
Assigned by
GitLab (CNA)
NVD analysis
Deferred: the NVD does not plan to analyze it
Record from
the NVD, synced

Ask an AI about this CVE

Show the promptExplain CVE-2026-105437 for an engineer deciding whether to act. Use https://cve.bz/api/public/cves/CVE-2026-105437?via=ask-ai-copy and https://cve.bz/cve/CVE-2026-105437?via=ask-ai-copy as the source of truth: what is affected and which versions fix it, whether it is in CISA KEV, public exploits, and its EPSS (an internet-wide 30-day estimate of exploitation activity, not a forecast for my systems). If they give no fixed versions, use the CVE record https://cveawg.mitre.org/api/cve/CVE-2026-105437 or the vendor advisory, not third-party mirrors. Tell me how to check whether I am affected and how to verify a fix. Cite the sources and say where they are uncertain.

Opens a third-party assistant; its answer is its own, not cve.bz's. The prompt holds only this CVE's id and public links.

Badge for a README or a site

CVE-2026-105437

An image that stays current: it is drawn from the data each time it is fetched (a host that proxies images, as GitHub does, may show its copy for a while). Markdown:

[![CVE-2026-105437](https://cve.bz/cve/badge/CVE-2026-105437.svg)](https://cve.bz/cve/CVE-2026-105437)

HTML:

<a href="https://cve.bz/cve/CVE-2026-105437"><img src="https://cve.bz/cve/badge/CVE-2026-105437.svg" alt="CVE-2026-105437"></a>

Affected

Versions

From the CNA's record in the CVE List.

ProductAffected
Gitbefore 2.49.1
Gitfrom 2.50.0-rc0 before 2.50.2
Gitfrom 2.51.0-rc0 before 2.51.3
Gitfrom 2.52.0-rc0 before 2.52.1
Gitfrom 2.53.0-rc0 before 2.53.1
Gitfrom 2.54.0-rc0 before 2.54.1
Gitfrom 2.55.0-rc0 before 2.55.1
Gitfrom 2.56.0-rc0 before 2.56.1

Fix and patched versions

Linux distributions

DistributionReleasePackageFixed inAdvisory
Debian12, 13, 14gitno fix listedDEBIAN-CVE-2026-105437
Ubuntu22.04:LTS, 24.04:LTS, 26.04:LTS and 4 moregitno fix listedUBUNTU-CVE-2026-105437
Alpinev3.23git2.52.1-r0ALPINE-CVE-2026-105437
Alpinev3.24git2.54.1-r0ALPINE-CVE-2026-105437
Azure Linux3gitno fix listedAZL-113311
Azure Linux3libgit2no fix listedAZL-113555
Azure Linux3rustno fix listedAZL-113630 AZL-113633
Alpaquitastreamgit2.56.1-r0BELL-CVE-2026-105437

From the distributions' data via OSV.dev: the Debian Security Tracker; Ubuntu Security Notices © Canonical Ltd., CC BY-SA 4.0; the Alpine secdb, CC BY-SA 4.0; Microsoft's Azure Linux vulnerability data, MIT; BellSoft's OSV database, MIT. Modified: reformatted and linked to CVE records. Credits. On the distributions' own pages: Debian · Ubuntu · Alpine · Alpaquita.

Red Hat

Red Hat rates this Important.

Red Hat's statement

Red Hat rates this flaw as Important because heap memory corruption caused by an integer overflow can lead to arbitrary code execution within the context of the user executing Git. While exploitation can yield severe impacts on confidentiality, integrity, and availability, successful exploitation requires user interaction to initiate merge actions on crafted repository content. In typical Red Hat deployments, risk is primarily concentrated in developer environments and automated CI/CD systems processing untrusted pull requests or branches.

Red Hat's mitigation

Mitigation for this issue is either not available or the currently available options do not meet the Red Hat Product Security criteria comprising ease of use and deployment, applicability to widespread installation base, or stability.

ProductPackageStateAdvisory
Red Hat Enterprise Linux 10gitAffected
Red Hat Enterprise Linux 6gitAffected
Red Hat Enterprise Linux 7gitAffected
Red Hat Enterprise Linux 8gitAffected
Red Hat Enterprise Linux 9gitAffected
Red Hat Hardened ImagesgitAffected
Red Hat OpenShift AI (RHOAI)rhoai/odh-workbench-codeserver-datascience-cpu-py312-rhel9Affected
Red Hat OpenShift Container Platform 4openshift/ose-rhel-coreos-8Affected
Red Hat OpenShift Container Platform 4openshift/ose-rhel-coreos-9Affected
Red Hat OpenShift Container Platform 5openshift/ose-rhel-coreos-9Affected
Red Hat OpenShift Dev Spacesdevspaces/code-rhel9Affected
Red Hat OpenShift Dev Spacesdevspaces/pluginregistry-rhel9Affected
Red Hat Satellite 6rubygem-gitAffected

Contains Red Hat Security Data © Red Hat, Inc., licensed under CC BY 4.0. Source: https://access.redhat.com/security/data. Modified: reformatted. Red Hat's page for CVE-2026-105437.

GitHub PoC (unverified)

Repositories on GitHub named after this CVE. Nobody has checked them and they are not scanned: some hold a working proof of concept, some nothing useful, and some malware made to look like one. Read the code before you run any of it.

  • googlesky/CVE-2026-105437 0 stars, Python, created
    PoC for CVE-2026-105437 — Git's three-way merge (xdiff/xmerge.c) sizes the merge output buffer in a 32-bit int, so a committed conflict-mar…

Attack patterns (CAPEC)

  • CAPEC-92 Forced Integer Overflow Likelihood: High · Severity: High

The attack patterns MITRE's CAPEC relates to this record's weaknesses, as MITRE names them. Credits.

History

  1. The NVD deferred its analysis

Changes since this site first stored the record. The same for every record: /api/public/changes.

References

Check your stackJSON