CVE-2026-53587libgit2 - Unauthenticated network-reachable heap out-of-bounds read in…
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.
What to do
Fixed builds are available from AlmaLinux, Alpine, Debian, Red Hat, Rocky Linux, Ubuntu: see the table below for the fixed version per release.
Red Hat has not shipped a fix for every release yet.
Is your server affected? One read-only command checks every installed package against this CVE and all others, using each vendor's fixed versions. Get started or get a free API key.
curl -sS "https://api.cvefocus.com/v1/check?format=text" -H "Authorization: Bearer $CVEFOCUS_KEY" \ -H "Content-Type: text/plain" --data-binary @inventory.txt
Vendor status at a glance
Status by vendor and release
From each vendor's own security data and VEX statements. "Fixed" means a fixed build is published for that release.
| Release | Package | Status | Fixed version | Advisory |
|---|---|---|---|---|
| Ubuntu 26.04 | libgit2 | Fixed | 1.9.1+ds-1ubuntu1.1 | UBUNTU-CVE-2026-53587 |
| Ubuntu 24.04 | libgit2 | Fixed | 1.7.2+ds-1ubuntu3.1 | UBUNTU-CVE-2026-53587 |
| Debian 14 | libgit2 | Fixed | 1.9.6+ds-1 | DEBIAN-CVE-2026-53587 |
| Debian 13 | libgit2 | Fixed | 1.9.0+ds-2+deb13u1 | DEBIAN-CVE-2026-53587 |
| Red Hat Enterprise Linux 10 | cargo | Fixed | 0:1.92.0-2.el10_2 | RHSA-2026:67286 |
| Red Hat Enterprise Linux 10 | clippy | Fixed | 0:1.92.0-2.el10_2 | RHSA-2026:67286 |
| Red Hat Enterprise Linux 10 | rust | Fixed | 0:1.92.0-2.el10_2 | RHSA-2026:67286 |
| Red Hat Enterprise Linux 10 | rust-analyzer | Fixed | 0:1.92.0-2.el10_2 | RHSA-2026:67286 |
| Red Hat Enterprise Linux 10 | rust-debugger-common | Fixed | 0:1.92.0-2.el10_2 | RHSA-2026:67286 |
| Red Hat Enterprise Linux 10 | rust-doc | Fixed | 0:1.92.0-2.el10_2 | RHSA-2026:67286 |
| Red Hat Enterprise Linux 10 | rust-gdb | Fixed | 0:1.92.0-2.el10_2 | RHSA-2026:67286 |
| Red Hat Enterprise Linux 10 | rust-lldb | Fixed | 0:1.92.0-2.el10_2 | RHSA-2026:67286 |
| Red Hat Enterprise Linux 10 | rust-src | Fixed | 0:1.92.0-2.el10_2 | RHSA-2026:67286 |
| Red Hat Enterprise Linux 10 | rust-std-static | Fixed | 0:1.92.0-2.el10_2 | RHSA-2026:67286 |
| Red Hat Enterprise Linux 10 | rust-std-static-aarch64-unknown-none-softfloat | Fixed | 0:1.92.0-2.el10_2 | RHSA-2026:67286 |
| Red Hat Enterprise Linux 10 | rust-std-static-wasm32-unknown-unknown | Fixed | 0:1.92.0-2.el10_2 | RHSA-2026:67286 |
| Red Hat Enterprise Linux 10 | rust-std-static-wasm32-wasip1 | Fixed | 0:1.92.0-2.el10_2 | RHSA-2026:67286 |
| Red Hat Enterprise Linux 10 | rust-std-static-x86_64-unknown-none | Fixed | 0:1.92.0-2.el10_2 | RHSA-2026:67286 |
| Red Hat Enterprise Linux 10 | rust-toolset | Fixed | 0:1.92.0-2.el10_2 | RHSA-2026:67286 |
| Red Hat Enterprise Linux 10 | rust-toolset-srpm-macros | Fixed | 0:1.92.0-2.el10_2 | RHSA-2026:67286 |
| Red Hat Enterprise Linux 10 | rustfmt | Fixed | 0:1.92.0-2.el10_2 | RHSA-2026:67286 |
| Red Hat Enterprise Linux 9 | cargo | Fixed | 0:1.92.0-2.el9_8 | RHSA-2026:67285 |
| Red Hat Enterprise Linux 9 | clippy | Fixed | 0:1.92.0-2.el9_8 | RHSA-2026:67285 |
| Red Hat Enterprise Linux 9 | rust | Fixed | 0:1.92.0-2.el9_8 | RHSA-2026:67285 |
| Red Hat Enterprise Linux 9 | rust-analyzer | Fixed | 0:1.92.0-2.el9_8 | RHSA-2026:67285 |
| Red Hat Enterprise Linux 9 | rust-debugger-common | Fixed | 0:1.92.0-2.el9_8 | RHSA-2026:67285 |
| Red Hat Enterprise Linux 9 | rust-doc | Fixed | 0:1.92.0-2.el9_8 | RHSA-2026:67285 |
| Red Hat Enterprise Linux 9 | rust-gdb | Fixed | 0:1.92.0-2.el9_8 | RHSA-2026:67285 |
| Red Hat Enterprise Linux 9 | rust-lldb | Fixed | 0:1.92.0-2.el9_8 | RHSA-2026:67285 |
| Red Hat Enterprise Linux 9 | rust-src | Fixed | 0:1.92.0-2.el9_8 | RHSA-2026:67285 |
| Red Hat Enterprise Linux 9 | rust-std-static | Fixed | 0:1.92.0-2.el9_8 | RHSA-2026:67285 |
| Red Hat Enterprise Linux 9 | rust-std-static-wasm32-unknown-unknown | Fixed | 0:1.92.0-2.el9_8 | RHSA-2026:67285 |
| Red Hat Enterprise Linux 9 | rust-std-static-wasm32-wasip1 | Fixed | 0:1.92.0-2.el9_8 | RHSA-2026:67285 |
| Red Hat Enterprise Linux 9 | rust-toolset | Fixed | 0:1.92.0-2.el9_8 | RHSA-2026:67285 |
| Red Hat Enterprise Linux 9 | rustfmt | Fixed | 0:1.92.0-2.el9_8 | RHSA-2026:67285 |
| Red Hat Enterprise Linux 8 | libgit2 | Fix pending Affected | ||
| Red Hat Enterprise Linux 8 | libgit2-devel | Fix pending Affected | ||
| AlmaLinux 10 | rust-debugger-common | Fixed | 1.92.0-2.el10_2.alma.1 | ALSA-2026:67286 |
| AlmaLinux 10 | rust-gdb | Fixed | 1.92.0-2.el10_2.alma.1 | ALSA-2026:67286 |
| AlmaLinux 10 | rust-lldb | Fixed | 1.92.0-2.el10_2.alma.1 | ALSA-2026:67286 |
| AlmaLinux 10 | rust-src | Fixed | 1.92.0-2.el10_2.alma.1 | ALSA-2026:67286 |
| AlmaLinux 10 | rust-std-static-wasm32-unknown-unknown | Fixed | 1.92.0-2.el10_2.alma.1 | ALSA-2026:67286 |
| AlmaLinux 10 | rust-std-static-wasm32-wasip1 | Fixed | 1.92.0-2.el10_2.alma.1 | ALSA-2026:67286 |
| AlmaLinux 10 | rust-toolset | Fixed | 1.92.0-2.el10_2.alma.1 | ALSA-2026:67286 |
| AlmaLinux 10 | rust-toolset-srpm-macros | Fixed | 1.92.0-2.el10_2.alma.1 | ALSA-2026:67286 |
| AlmaLinux 9 | cargo | Fixed | 1.92.0-2.el9_8 | ALSA-2026:67285 |
| AlmaLinux 9 | clippy | Fixed | 1.92.0-2.el9_8 | ALSA-2026:67285 |
| AlmaLinux 9 | rust | Fixed | 1.92.0-2.el9_8 | ALSA-2026:67285 |
| AlmaLinux 9 | rust-analyzer | Fixed | 1.92.0-2.el9_8 | ALSA-2026:67285 |
| AlmaLinux 9 | rust-debugger-common | Fixed | 1.92.0-2.el9_8 | ALSA-2026:67285 |
| AlmaLinux 9 | rust-doc | Fixed | 1.92.0-2.el9_8 | ALSA-2026:67285 |
| AlmaLinux 9 | rust-gdb | Fixed | 1.92.0-2.el9_8 | ALSA-2026:67285 |
| AlmaLinux 9 | rust-lldb | Fixed | 1.92.0-2.el9_8 | ALSA-2026:67285 |
| AlmaLinux 9 | rust-src | Fixed | 1.92.0-2.el9_8 | ALSA-2026:67285 |
| AlmaLinux 9 | rust-std-static | Fixed | 1.92.0-2.el9_8 | ALSA-2026:67285 |
| AlmaLinux 9 | rust-std-static-wasm32-unknown-unknown | Fixed | 1.92.0-2.el9_8 | ALSA-2026:67285 |
| AlmaLinux 9 | rust-std-static-wasm32-wasip1 | Fixed | 1.92.0-2.el9_8 | ALSA-2026:67285 |
| AlmaLinux 9 | rust-toolset | Fixed | 1.92.0-2.el9_8 | ALSA-2026:67285 |
| AlmaLinux 9 | rustfmt | Fixed | 1.92.0-2.el9_8 | ALSA-2026:67285 |
| Rocky Linux 10 | rust | Fixed | 0:1.92.0-2.el10_2 | RLSA-2026:67286 |
| Rocky Linux 9 | rust | Fixed | 0:1.92.0-2.el9_8 | RLSA-2026:67285 |
| Alpine Linux 3.24 | libgit2 | Fixed | 1.9.6-r0 | ALPINE-CVE-2026-53587 |
| Alpine Linux 3.23 | libgit2 | Fixed | 1.9.6-r0 | ALPINE-CVE-2026-53587 |
What the vendor says
As published in the CVE record by GitHub_M, the CVE's assigner (usually the vendor). Check the vendor's advisory before acting.
- libgit2: affected: < 1.8.6, >= 1.9.0, < 1.9.5
References
- https://github.com/libgit2/libgit2/security/advisories/GHSA-pm24-4jhq-3xvm
- https://github.com/libgit2/libgit2/commit/2c0ce8c0132ac38ab0db28239462a671e2e5440e
- https://github.com/libgit2/libgit2/commit/affda60c10fcef16723451c0d7dc71b71dc20ad3
- https://github.com/libgit2/libgit2/commit/d7a9fb87f504434e9f45228678953c4fa56e7640
- https://github.com/libgit2/libgit2/releases/tag/v1.8.6
- https://github.com/libgit2/libgit2/releases/tag/v1.9.5
About this page
Compiled by CVEfocus from the CVE List, the security data and VEX statements of Ubuntu, Debian, Red Hat, AlmaLinux, Rocky Linux and Microsoft, CISA's Known Exploited Vulnerabilities catalog and FIRST EPSS, refreshed several times a day (data status). Information only; see the disclaimer. Official record: cve.org · NVD.