Read the docs

Heap buffer overflow in Git three-way merge code

Priority HIGH 68CWE-122Published · Updated

Key facts

Attack vector
Network
Privileges required
None
User interaction
Required
Attack complexity
High
Impact type
Code execution
Confidentiality · integrity · availability
High · High · High
Fix status
Partial Red Hat: 11 without a fix

Attack profile from CVSS 3.1 · CNA. Fix status from CNA and Red Hat. Impact type from CWE-122 and the CVSS impact.

Summary

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 and from 2.56.0-rc0 before 2.56.1 are affected. The merge output size counter overflows, so Git writes past a too-small heap buffer (CWE-122). A repository author, or anyone able to push and request merges on a server, can trigger it. A public exploit is linked in the references.

Written with Claude Haiku 5.5 from the sources below · 2026-11-16

Description from the CNA

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.

Why it matters now

Exploitation Proof of concept CISA SSVC · not in CISA KEV
EPSS 0.00399 34th percentileScored 2026-11-16
Public exploit Yes 1 exploit referenceTagged by the CNA
Fix Partial Git (Git): 2.49.1, 2.50.2, 2.51.3 +5Red Hat: 11 without a fix

SSVC decision points

CISA ADP · SSVC 2.0.3

Exploitation
Poc
Automatable
No
Technical impact
Total

The decision (Track, Attend, Act) also depends on your mission and well-being impact; see CISA's SSVC guide.

Affected products

VendorProductAffected versionsFixed inStatusSource
GitGitbefore 2.49.1; 2.50.0-rc0 to before 2.50.2; 2.51.0-rc0 to before 2.51.3; 2.52.0-rc0 to before 2.52.1; 2.53.0-rc0 to before 2.53.1; 2.54.0-rc0 to before 2.54.1; 2.55.0-rc0 to before 2.55.1; 2.56.0-rc0 to before 2.56.12.49.1, 2.50.2, 2.51.3, 2.52.1, 2.53.1, 2.54.1, 2.55.1, 2.56.1Patch availableCNA
  • Git VendorGit Affected before 2.49.1; 2.50.0-rc0 to before 2.50.2; 2.51.0-rc0 to before 2.51.3; 2.52.0-rc0 to before 2.52.1; 2.53.0-rc0 to before 2.53.1; 2.54.0-rc0 to before 2.54.1; 2.55.0-rc0 to before 2.55.1; 2.56.0-rc0 to before 2.56.1 Fixed in 2.49.1, 2.50.2, 2.51.3, 2.52.1, 2.53.1, 2.54.1, 2.55.1, 2.56.1 Patch available CNA

CPE names CNA · 1

CPEVersionsRoleVendor
cpe:2.3:a:git-scm:git:*:*:*:*:*:*:*:*——Git-scm
  • cpe:2.3:a:git-scm:git:*:*:*:*:*:*:*:* Versions — — ·Git-scm

Remediation

Upgrade Git to 2.49.1, 2.50.2, 2.51.3, 2.52.1, 2.53.1, 2.54.1, 2.55.1 or 2.56.1. Red Hat lists Red Hat Enterprise Linux 6, 7, 8, 9 and 10, Red Hat Hardened Images, Red Hat OpenShift AI (RHOAI), Red Hat OpenShift Container Platform 4 and 5, Red Hat OpenShift Dev Spaces and Red Hat Satellite 6 as affected with no fix available. Servers that cannot upgrade can add conflict-marker-size=7 to each repository's info/attributes.

Written with Claude Haiku 5.5 from the sources below · 2026-11-16

  • Fix · CNA Git (Git) Fixed in 2.49.1, 2.50.2, 2.51.3, 2.52.1, 2.53.1, 2.54.1, 2.55.1, 2.56.1

Vendor assessments

Red Hat

Red Hat rating: Important. Red Hat's page for this CVE →

ProductStatusPlan or fix
Red Hat Enterprise Linux 10AffectedNo fix yet
Red Hat Enterprise Linux 6AffectedNo fix yet
Red Hat Enterprise Linux 7AffectedNo fix yet
Red Hat Enterprise Linux 8AffectedNo fix yet
Red Hat Enterprise Linux 9AffectedNo fix yet
Red Hat Hardened ImagesAffectedNo fix yet
Red Hat OpenShift AI (RHOAI)AffectedNo fix yet
Red Hat OpenShift Container Platform 4AffectedNo fix yet
Red Hat OpenShift Container Platform 5AffectedNo fix yet
Red Hat OpenShift Dev SpacesAffectedNo fix yet
Red Hat Satellite 6AffectedNo fix yet
Not affected: 1 product
  • Red Hat OpenShift Dev Spaces

Timeline

  1. 2026-11-10 Threatist record created from CVE-2026-105437
  2. 2026-11-10 Alias added: GHSA-m7r7-8v36-j77r
  3. 2026-11-11 Affected versions changed · Red Hat
  4. 2026-11-11 CVSS score added · Red Hat
  5. 2026-11-12 Priority changed: MEDIUM → LOW
  6. 2026-11-14 Affected versions changed · Red Hat
  7. 2026-11-16 CISA SSVC decision points changed

References

  • TI-2025-30709 Git config quoting flaw allows arbitrary code execution KEVCVSS 3.1HIGH 8.1
  • TI-2022-07580 gitattributes parsing integer overflow in git CVSS 3.1CRITICAL 9.8
  • TI-2022-20244 Integer overflow in `git archive`, `git log --format` leading to RCE in git CVSS 3.1CRITICAL 9.8
  • TI-2021-04400 malicious repositories can execute remote code while cloning CVSS 3.1HIGH 8.0
  • TI-2024-21101 Git's recursive clones on case-insensitive filesystems that support symlinks are susceptible to Remote Code Execution CVSS 3.1CRITICAL 9.1
  • TI-2023-10933 "git apply --reject" partially-controlled arbitrary file write CVSS 3.1HIGH 7.5
See all 37 →

Sources