---
id: CVE-2026-53587
title: >-
  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
summary: >-
  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…
severity: high
cvss: 7.5
cvssVector: 'CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H'
cwe:
  - CWE-20
  - CWE-125
  - CWE-126
  - CWE-1284
vendor: libgit2
product: libgit2
affected:
  - libgit2 < 1.8.6
  - 'libgit2 >= 1.9.0, < 1.9.5'
published: '2026-08-20'
updated: '2026-09-09'
sourceUpdated: '2026-09-09T21:19:49.197'
source: NVD
sourceUrl: 'https://nvd.nist.gov/vuln/detail/CVE-2026-53587'
references:
  - url: >-
      https://github.com/libgit2/libgit2/commit/2c0ce8c0132ac38ab0db28239462a671e2e5440e
    label: security-advisories@github.com
  - url: >-
      https://github.com/libgit2/libgit2/commit/affda60c10fcef16723451c0d7dc71b71dc20ad3
    label: security-advisories@github.com
  - url: >-
      https://github.com/libgit2/libgit2/commit/d7a9fb87f504434e9f45228678953c4fa56e7640
    label: security-advisories@github.com
  - url: 'https://github.com/libgit2/libgit2/releases/tag/v1.8.6'
    label: security-advisories@github.com
  - url: 'https://github.com/libgit2/libgit2/releases/tag/v1.9.5'
    label: security-advisories@github.com
  - url: 'https://github.com/libgit2/libgit2/security/advisories/GHSA-pm24-4jhq-3xvm'
    label: security-advisories@github.com
  - url: 'https://github.com/libgit2/libgit2/security/advisories/GHSA-pm24-4jhq-3xvm'
    label: 134c704f-9b21-4f2e-91b3-4a467353bcc0
  - url: >-
      https://security.access.redhat.com/data/csaf/v2/vex/2026/cve-2026-53587.json
  - url: 'https://access.redhat.com/security/cve/CVE-2026-53587'
  - url: 'https://bugzilla.redhat.com/show_bug.cgi?id=2520693'
  - url: 'https://www.cve.org/CVERecord?id=CVE-2026-53587'
  - url: 'https://nvd.nist.gov/vuln/detail/CVE-2026-53587'
  - url: 'https://access.redhat.com/errata/RHSA-2026:67286'
  - url: 'https://access.redhat.com/errata/RHSA-2026:67285'
  - url: 'https://access.redhat.com/errata/RHSA-2026:59361'
  - url: 'https://access.redhat.com/errata/RHSA-2026:69096'
  - url: 'https://access.redhat.com/errata/RHSA-2026:69097'
  - url: 'https://access.redhat.com/errata/RHSA-2026:69109'
tags:
  - nvd
  - cve.org
  - exploit-available
  - csaf
  - vex
  - red-hat
exploitAvailable: true
ssvc:
  exploitation: poc
  automatable: 'yes'
  technicalImpact: partial
  timestamp: '2026-08-20T19:18:28.320266Z'
ingestedAt: '2026-09-14T08:50:24.132Z'
epss: 0.00684
epssPercentile: 0.5045
exploits:
  github: 1
  githubRepos:
    - 'https://github.com/Alixploit22/CVE-2026-53587'
  checkedAt: '2026-09-25T08:21:02.183Z'
patched:
  - enterprise_linux_appstream_v_10
  - enterprise_linux_appstream_v_9
  - enterprise_linux_codeready_linux_builder_v_10
  - hardened_images
---

## Overview

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.

## Remediation

Refer to the linked advisories for vendor-supplied fixes and affected version ranges.

## Vendor advisories

- **RHSA-2026:67286** · Red Hat · fixed in: Red Hat Enterprise Linux AppStream (v. 10), Red Hat Enterprise Linux CodeReady Linux Builder (v. 10) · released 2026-09-14 · [advisory](https://access.redhat.com/errata/RHSA-2026:67286)
- **RHSA-2026:67285** · Red Hat · fixed in: Red Hat Enterprise Linux AppStream (v. 9) · released 2026-09-14 · [advisory](https://access.redhat.com/errata/RHSA-2026:67285)
- **RHSA-2026:59361** · Red Hat · fixed in: Red Hat Hardened Images · released 2026-08-25 · [advisory](https://access.redhat.com/errata/RHSA-2026:59361)
- **Red Hat VEX** · Important · affected: Red Hat Enterprise Linux 8, Red Hat Enterprise Linux AI (RHEL AI) 3 · no fix planned: Red Hat Enterprise Linux 8, Red Hat Enterprise Linux AI (RHEL AI) 3 · updated 2026-09-21 · [vex](https://security.access.redhat.com/data/csaf/v2/vex/2026/cve-2026-53587.json)
- **RHSA-2026:69096** · Red Hat · fixed in: Red Hat Enterprise Linux AppStream EUS (v. 10.0), Red Hat Enterprise Linux CodeReady Linux Builder EUS (v. 10.0) · released 2026-09-21 · [advisory](https://access.redhat.com/errata/RHSA-2026:69096)
- **RHSA-2026:69097** · Red Hat · fixed in: Red Hat Enterprise Linux AppStream E4S (v.9.4) · released 2026-09-21 · [advisory](https://access.redhat.com/errata/RHSA-2026:69097)
- **RHSA-2026:69109** · Red Hat · fixed in: Red Hat Enterprise Linux AppStream EUS (v.9.6) · released 2026-09-21 · [advisory](https://access.redhat.com/errata/RHSA-2026:69109)
