Cloudanix VulnDB

CVE-2026-53587

High · 7.5

CVSS

7.5

EPSS

0.5%

Published

Aug 20, 2026

CISA due date

—

Cloudanix analysis

Next patch cycle SSVC: Track

A programming mistake in a common Git library can make programs that use it suddenly stop working when they talk to certain servers.

Exploitation
Remote Unauthenticated
Attacker needs
None
Complexity
Low
Impact
Denial Of Service
Component
Library
Class
Buffer Overflow
Remediation
Upgrade
Effort
Medium
Patch risk
Low

What it actually does

A malicious Git server can send a refs-advertisement packet with fewer than 14 bytes after the object-format= capability, bypassing a length check before a fixed-size strncmp in set_data; this causes format_str to read past the pkt-line buffer, memchr to underflow, and a heap out-of-bounds walk that terminates the client process.

Why it matters to the business

Client applications or tools that embed libgit2 may crash on the first connection to a Git remote over HTTP, HTTPS, SSH or the native Git protocol, interrupting builds, deployments and automated repository operations until the process is restarted.

How an attack unfolds

An attacker hosts a Git server that returns a truncated pkt-line capability list in the initial refs advertisement; when a vulnerable client connects, the unchecked strncmp and subsequent length calculation walk off the end of the heap buffer and abort the process.

How to fix it

Upgrade libgit2 to 1.8.6 or 1.9.5; for Red Hat packages apply libgit2-main 1.9.7-1.hum1, rust on el10 1.92.0-2.el10_2, or rust on el9 1.92.0-2.el9_8 via the referenced RHSA.

How to confirm the fix worked

Confirm the installed libgit2 or rust package version matches or exceeds the listed fixed releases; perform a test clone or ls-remote against a server that returns a short object-format capability line and verify the client no longer crashes.

Typical attack path

  1. Attacker configures a Git server to respond to the initial capability request with a pkt-line shorter than 14 bytes after 'object-format='
  2. Victim client initiates a fetch, clone or ls-remote over any supported transport
  3. Server sends the malformed refs-advertisement packet
  4. Client parses the packet in smart_pkt.c, performs the unsafe strncmp and underflowing memchr walk
  5. Process crashes with a segmentation fault or abort

How to detect it

Monitor application logs and crash reports for segmentation faults or aborts that occur immediately after a Git transport handshake; correlate with outbound connections to previously unseen Git remotes.

What your security team should do

  • Apply the vendor updates for libgit2 and dependent rust packages within the next maintenance window
  • Inventory all builds and containers that statically or dynamically link libgit2
  • Add version checks for libgit2 to CI pipelines to prevent re-introduction of vulnerable releases

The record

libgit2 is a portable C implementation of the Git core methods provided as a linkable library with a solid API, allowing to build Git functionality into your application. Prior to 1.8.6 and 1.9.5, libgit2 performs a fixed-size strncmp in set_data in src/libgit2/transports/smart_pkt.c without first verifying that the smart-protocol pkt-line capability buffer contains 14 bytes. A malicious Git server can make bytes after the pkt-line complete object-format=, causing format_str to advance beyond the pkt-line and the following memchr length calculation to underflow. The resulting heap out-of-bounds walk can crash a client during the first refs-advertisement packet over HTTP, HTTPS, SSH, or the Git protocol. This issue is fixed in versions 1.8.6 and 1.9.5.

Affected packages

Ecosystem Package Introduced Fixed

Related vulnerabilities