home / blog
2026-11-11 · high
CVE-2026-105437: heap buffer overflow in Git merge
Heap buffer overflow in Git merge via conflict-marker-size. CVSS 7.5. PoC available. Immediate update advised.

CVE-2026-105437 describes a heap buffer overflow in Git's three-way merge code (xdiff/xmerge.c). The vulnerability lies in how output buffer size is handled: dimensions are stored in a 32-bit signed integer. The conflict-marker-size attribute, configurable from committed .gitattributes files, accepts any positive value. With high conflict counts and large marker size, total calculation exceeds 4 GiB, causing integer overflow. Git then writes merge output beyond allocated buffer boundaries. Affects git-merge, git-rebase, git-cherry-pick, and git-merge-tree.
The vulnerability scores CVSS 7.5 (high). A patch has been released, confirmed by validation against versions 2.56.0 vs 2.56.1. A proof-of-concept was published publicly on GitHub on 2026-11-11, hours after NVD disclosure. Signals indicate git-merge-tree is the primary attack vector, frequently used by Git forges on the server-side to verify merge feasibility. Any user able to push branches and request merges can trigger the overflow without additional human intervention.
For defense: update Git to patched version as soon as available. In the short term, if immediate update is not possible, apply the workaround by adding * conflict-marker-size=7 to the info/attributes file of each repository: this setting overrides any committed in-tree .gitattributes. For Git forges unable to update immediately, disable server-side merge feasibility checks for untrusted repositories until patching. Verify in staging environments that branch merging works correctly after updates.
At a glance
- What
- Heap buffer overflow in Git's three-way merge code (xdiff), caused by integer overflow in 32-bit signed integer calculating output buffer size. The conflict-marker-size attribute from .gitattributes, with numerous markers, causes overflow that writes merge output beyond allocated buffer.
- Severity
- CVSS 7.5 (high). Minimum impact is crash (SIGSEGV), but attacker-controlled output enables severe heap corruption. git-merge-tree is the primary attack vector in server environments.
- Affected versions
- Not reported in official NVD description. GitHub PoC validates vulnerability on v2.56.0 and confirms patched in v2.56.1. Check Git changelog for affected version ranges.
- Fix
- Patch already available: compute size as size_t with overflow checks at every addition. Git stops with error instead of overflowing. Temporary workaround: add * conflict-marker-size=7 to info/attributes (overrides in-tree .gitattributes) or disable server-side merge checks.
- Status
- Patch released. Public PoC confirmed on GitHub 2026-11-11. NVD disclosure 2026-11-10. Vulnerability verified and reproducible.
- Action
- Immediate: update Git to patched version. Short term: apply workaround if update cannot be done immediately. For forges: verify Git versions in use, disable merge checks if not updated. Long term: audit .gitattributes in critical repositories.
Sources: NVD, CVE-2026-105437