CVE-2026-105437
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.
Weakness
- CWE-122: Heap-based Buffer Overflow
CISA SSVC decision points
| Exploitation | poc |
|---|---|
| Automatable | no |
| Technical impact | total |
| Scored | 2026-11-16 |
Timeline
- 2026-11-10Published by the CNA18:34 UTC
- 2026-11-10Published in NVD19:17 UTC · 43 minutes after the CNA
- 2026-11-16CISA SSVC decision recorded6 days after publication
Affected products
Products listed as vulnerable. Upgrade to the version under "Fixed in", or a later one.
| Product | Vulnerable versions | Fixed in |
|---|---|---|
| git git | from 0 before 2.49.1fixed in 2.49.1from 2.50.0-rc0 before 2.50.2fixed in 2.50.2from 2.51.0-rc0 before 2.51.3fixed in 2.51.3from 2.52.0-rc0 before 2.52.1fixed in 2.52.1from 2.53.0-rc0 before 2.53.1fixed in 2.53.1(+3 more) | 2.49.12.50.22.51.32.52.12.53.1 |
| git-scm git |
References
- https://hackerone.com/reports/4044249
- https://gitlab.com/gitlab-org/git/-/work_items/814
- https://gitlab.com/gitlab-org/gitlab/-/work_items/632121
Get more CVE data from the API.
curl 'https://api.contrastcyber.com/cve_lookup/CVE-2026-105437'curl 'https://api.contrastcyber.com/cve_risk_score/CVE-2026-105437'curl 'https://api.contrastcyber.com/cve_exploit/CVE-2026-105437'curl 'https://api.contrastcyber.com/cve_products/CVE-2026-105437'
Sources
- Vulnerability data from the National Vulnerability Database (NIST) and the CVE Program. CVE records: Copyright © 1999-2026, The MITRE Corporation, used under the CVE Program Terms of Use. CVE® is a registered trademark of The MITRE Corporation.
- CWE definitions: Copyright © 2006-2026, The MITRE Corporation, used under the CWE Terms of Use. CWE is a trademark of The MITRE Corporation.
- OWASP Top 10 categories by the OWASP Foundation (CC BY 3.0).
- EPSS scores by FIRST.org EPSS, used with attribution.
- KEV catalog and SSVC decisions by CISA.
- Advisory data from the GitHub Advisory Database through OSV.dev (CC BY 4.0).
- Exploit metadata from the Exploit Database (GPL-2.0-only, metadata only).
- Nuclei template names from nuclei-templates (MIT).