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

- **Severity:** HIGH 7.5
- **CVSS:** 7.5 (v3.1, CNA) `CVSS:3.1/AV:N/AC:H/PR:N/UI:R/S:U/C:H/I:H/A:H`
- **CVSS metrics:** Attack vector: Network; Attack complexity: High; Privileges required: None; User interaction: Required; Scope: Unchanged; Confidentiality impact: High; Integrity impact: High; Availability impact: High
- **Exploited in the wild:** Not in CISA KEV
- **Public exploit / PoC:** Yes (see exploit references)
- **Remote exploitation:** Remote, no login needed
- **EPSS:** 0.53% (percentile 38, 2026-11-28)
- **CWE:** CWE-122
- **Published:** 2026-11-10T18:34:09.369Z
- **Modified:** 2026-11-16T19:17:24.450Z

## Who should check

- Anyone running Git \< 2.49.1; \>= 2.50.0-rc0, \< 2.50.2; \>= 2.51.0-rc0, \< 2.51.3; \>= 2.52.0-rc0, \< 2.52.1; \>= 2.53.0-rc0, \< 2.53.1; \>= 2.54.0-rc0, \< 2.54.1; \>= 2.55.0-rc0, \< 2.55.1; \>= 2.56.0-rc0, \< 2.56.1

## 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.

## Affected and fixed versions

- Git: \< 2.49.1; \>= 2.50.0-rc0, \< 2.50.2; \>= 2.51.0-rc0, \< 2.51.3; \>= 2.52.0-rc0, \< 2.52.1; \>= 2.53.0-rc0, \< 2.53.1; \>= 2.54.0-rc0, \< 2.54.1; \>= 2.55.0-rc0, \< 2.55.1; \>= 2.56.0-rc0, \< 2.56.1 (cvelist)

## Mitigation

- Upgrade Git to 2.56.1 or later.

## Check your systems with an agent

Paste this into a coding agent:

```text
Check whether anything I run is affected by CVE-2026-105437. Work read-only: do not install, upgrade, delete or change anything.

Details: https://flawdb.com/CVE-2026-105437.md
Affected: Git < 2.49.1; >= 2.50.0-rc0, < 2.50.2; >= 2.51.0-rc0, < 2.51.3; >= 2.52.0-rc0, < 2.52.1; >= 2.53.0-rc0, < 2.53.1; >= 2.54.0-rc0, < 2.54.1; >= 2.55.0-rc0, < 2.55.1; >= 2.56.0-rc0, < 2.56.1
Fixed in: Git 2.49.1, Git 2.50.2, Git 2.51.3, Git 2.52.1, Git 2.53.1, Git 2.54.1, Git 2.55.1, Git 2.56.1

Steps:
1. Search this machine and project for Git: dependency manifests and lockfiles, installed packages, container images and running services.
2. For each match, note the installed version and whether it is inside the affected range.
3. Report a table: location, installed version, affected (yes / no / unsure), evidence. If affected, say which fixed version or mitigation from the details link applies, but don't apply it.
```

## FAQ

### Is CVE-2026-105437 being exploited?

There is no confirmed exploitation: CVE-2026-105437 is not in the CISA Known Exploited Vulnerabilities catalog. Public exploit code or a proof of concept is available. EPSS estimates a 0.53% chance of exploitation in the next 30 days (as of 2026-11-28).

### How serious is CVE-2026-105437?

High: CVSS 7.5 (v3.1, scored by CNA). Remote, no login needed. A user has to take an action, such as opening a link, for the attack to work. The attack needs conditions outside the attacker's control, which makes it harder.

### Which versions are affected by CVE-2026-105437?

Git \< 2.49.1; \>= 2.50.0-rc0, \< 2.50.2; \>= 2.51.0-rc0, \< 2.51.3; \>= 2.52.0-rc0, \< 2.52.1; \>= 2.53.0-rc0, \< 2.53.1; \>= 2.54.0-rc0, \< 2.54.1; \>= 2.55.0-rc0, \< 2.55.1; \>= 2.56.0-rc0, \< 2.56.1.

### Is there a fix for CVE-2026-105437?

Yes. Fixed in Git 2.49.1, Git 2.50.2, Git 2.51.3, Git 2.52.1, Git 2.53.1, Git 2.54.1, Git 2.55.1, Git 2.56.1. Upgrade Git to 2.56.1 or later.

### How do I check if I'm affected by CVE-2026-105437?

Find where you use the affected software (dependency lockfiles, installed packages, container images, servers) and compare the installed version with the affected range above. The agent prompt on this page does this read-only.

## References

- exploit: <https://hackerone.com/reports/4044249>
- other: <https://gitlab.com/gitlab-org/git/-/work_items/814>
- other: <https://gitlab.com/gitlab-org/gitlab/-/work_items/632121>

## Attribution

- CVE Program: CVE® is a registered trademark of The MITRE Corporation. CVE records © 1999–2026 The MITRE Corporation. <https://www.cve.org/Legal/TermsOfUse>
- NVD: This product uses data from the NVD API but is not endorsed or certified by the NVD. <https://nvd.nist.gov/vuln/detail/CVE-2026-105437>
- FIRST EPSS: EPSS scores by FIRST <https://www.first.org/epss/>

HTML: <https://flawdb.com/CVE-2026-105437> · JSON: <https://flawdb.com/api/v1/entries/CVE-2026-105437>
