# CVE-2026-105437: Heap-based Buffer Overflow in Git

- Severity: High 7.5 (CVSS:3.1, scored by GitLab) `CVSS:3.1/AV:N/AC:H/PR:N/UI:R/S:U/C:H/I:H/A:H`
- Known to be exploited: not in CISA's catalogue, which lists only what CISA has confirmed
- Likelihood of exploitation in the next 30 days (EPSS): 0.53%, higher than 46% of CVEs (2026-12-01)
- Public exploit code or proof of concept: one link below, marked "exploit"
- Published: 2026-11-10T18:34:09.369Z
- Modified: 2026-11-27T06:45:03.291Z
- Also known as: BIT-GIT-2026-105437
- Weaknesses: CWE-122
- SSVC (CISA-ADP): exploitation poc, automatable no, technical impact total
- Assigned by: GitLab

## Description

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.

(As written by CVE List.)

## Affected

- Git Git: before 2.49.1; from 2.50.0-rc0 before 2.50.2; from 2.51.0-rc0 before 2.51.3; from 2.52.0-rc0 before 2.52.1; from 2.53.0-rc0 before 2.53.1; from 2.54.0-rc0 before 2.54.1; from 2.55.0-rc0 before 2.55.1; from 2.56.0-rc0 before 2.56.1
- git (Bitnami): before 2.49.1; from 2.50.0 before 2.50.2; from 2.51.0 before 2.51.3; from 2.52.0 before 2.52.1; from 2.53.0 before 2.53.1; from 2.54.0 before 2.54.1; from 2.55.0 before 2.55.1; from 2.56.0 before 2.56.1

## Every score

- GitLab: 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`
- Bitnami Vulnerability Database: rating High

## References

- <https://hackerone.com/reports/4044249> (exploit, permissions-required, technical-description, web)
- <https://gitlab.com/gitlab-org/git/-/work_items/814> (web)
- <https://gitlab.com/gitlab-org/gitlab/-/work_items/632121> (web)
- <https://nvd.nist.gov/vuln/detail/CVE-2026-105437> (web)

## Sources

- CVE List: [CVE-2026-105437](https://www.cve.org/CVERecord?id=CVE-2026-105437), CVE Terms of Use, modified 2026-11-16
- NVD: [CVE-2026-105437](https://nvd.nist.gov/vuln/detail/CVE-2026-105437), Public domain, modified 2026-11-16
- Bitnami Vulnerability Database: [BIT-GIT-2026-105437](https://osv.dev/vulnerability/BIT-GIT-2026-105437), Apache-2.0, modified 2026-11-27

---

Page: https://cve.day/CVE-2026-105437 · Whole record: https://cve.day/CVE-2026-105437.json · Rebuilt by cve.day 2026-11-27T06:57:05.904Z
