CVE-2026-53585libgit2: Unbounded Memory Allocation via Delta Object Result-Size Header
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, git_delta_apply in src/libgit2/delta.c trusts the attacker-controlled res_sz value parsed by hdr_sz from a delta object header and passes that amount to git__malloc before validating delta instructions. Malicious pack data supplied through git_clone, git_fetch, git_remote_fetch, git_indexer_append, or a local attacker-supplied repository can use a very small multi-level OFS_DELTA chain to retain extremely large allocations and exhaust memory. This issue is fixed in versions 1.8.6 and 1.9.5.
What to do
Fixed builds are available from Alpine, Debian, Ubuntu: see the table below for the fixed version per release.
Red Hat, Ubuntu have 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-53585 |
| Ubuntu 24.04 | libgit2 | Fixed | 1.7.2+ds-1ubuntu3.1 | UBUNTU-CVE-2026-53585 |
| Ubuntu 22.04 | libgit2 | Fix pending | 1.1.0+dfsg.1-4.1ubuntu0.1+esm1 (Ubuntu Pro) | UBUNTU-CVE-2026-53585 |
| Ubuntu 20.04 | libgit2 | Fix pending | 0.28.4+dfsg.1-2ubuntu0.1+esm1 (Ubuntu Pro) | UBUNTU-CVE-2026-53585 |
| Ubuntu 18.04 | libgit2 | Fix pending | 0.26.0+dfsg.1-1.1ubuntu0.2+esm2 (Ubuntu Pro) | UBUNTU-CVE-2026-53585 |
| Ubuntu 16.04 | libgit2 | Fix pending | 0.24.1-2ubuntu0.2+esm3 (Ubuntu Pro) | UBUNTU-CVE-2026-53585 |
| Ubuntu 14.04 | libgit2 | Fix pending | 0.19.0-2ubuntu0.4+esm2 (Ubuntu Pro) | UBUNTU-CVE-2026-53585 |
| Debian 14 | libgit2 | Fixed | 1.9.6+ds-1 | DEBIAN-CVE-2026-53585 |
| Debian 13 | libgit2 | Fixed | 1.9.0+ds-2+deb13u1 | DEBIAN-CVE-2026-53585 |
| Debian 12 | libgit2 | Fixed | 1.5.1+ds-1+deb12u2 | DEBIAN-CVE-2026-53585 |
| Red Hat Enterprise Linux 10 | cargo | Fix pending Fix deferred | ||
| Red Hat Enterprise Linux 10 | clippy | Fix pending Fix deferred | ||
| Red Hat Enterprise Linux 10 | rust | Fix pending Fix deferred | ||
| Red Hat Enterprise Linux 10 | rust-analyzer | Fix pending Fix deferred | ||
| Red Hat Enterprise Linux 10 | rust-debugger-common | Fix pending Fix deferred | ||
| Red Hat Enterprise Linux 10 | rust-doc | Fix pending Fix deferred | ||
| Red Hat Enterprise Linux 10 | rust-gdb | Fix pending Fix deferred | ||
| Red Hat Enterprise Linux 10 | rust-lldb | Fix pending Fix deferred | ||
| Red Hat Enterprise Linux 10 | rust-src | Fix pending Fix deferred | ||
| Red Hat Enterprise Linux 10 | rust-std-static | Fix pending Fix deferred | ||
| Red Hat Enterprise Linux 10 | rust-std-static-aarch64-unknown-none-softfloat | Fix pending Fix deferred | ||
| Red Hat Enterprise Linux 10 | rust-std-static-wasm32-unknown-unknown | Fix pending Fix deferred | ||
| Red Hat Enterprise Linux 10 | rust-std-static-wasm32-wasip1 | Fix pending Fix deferred | ||
| Red Hat Enterprise Linux 10 | rust-std-static-x86_64-unknown-none | Fix pending Fix deferred | ||
| Red Hat Enterprise Linux 10 | rust-toolset | Fix pending Fix deferred | ||
| Red Hat Enterprise Linux 10 | rust-toolset-srpm-macros | Fix pending Fix deferred | ||
| Red Hat Enterprise Linux 10 | rustfmt | Fix pending Fix deferred | ||
| Red Hat Enterprise Linux 9 | cargo | Fix pending Fix deferred | ||
| Red Hat Enterprise Linux 9 | clippy | Fix pending Fix deferred | ||
| Red Hat Enterprise Linux 9 | rust | Fix pending Fix deferred | ||
| Red Hat Enterprise Linux 9 | rust-analysis | Fix pending Fix deferred | ||
| Red Hat Enterprise Linux 9 | rust-analyzer | Fix pending Fix deferred | ||
| Red Hat Enterprise Linux 9 | rust-debugger-common | Fix pending Fix deferred | ||
| Red Hat Enterprise Linux 9 | rust-doc | Fix pending Fix deferred | ||
| Red Hat Enterprise Linux 9 | rust-gdb | Fix pending Fix deferred | ||
| Red Hat Enterprise Linux 9 | rust-lldb | Fix pending Fix deferred | ||
| Red Hat Enterprise Linux 9 | rust-src | Fix pending Fix deferred | ||
| Red Hat Enterprise Linux 9 | rust-std-static | Fix pending Fix deferred | ||
| Red Hat Enterprise Linux 9 | rust-std-static-wasm32-unknown-unknown | Fix pending Fix deferred | ||
| Red Hat Enterprise Linux 9 | rust-std-static-wasm32-wasi | Fix pending Fix deferred | ||
| Red Hat Enterprise Linux 9 | rust-std-static-wasm32-wasip1 | Fix pending Fix deferred | ||
| Red Hat Enterprise Linux 9 | rust-toolset | Fix pending Fix deferred | ||
| Red Hat Enterprise Linux 9 | rustfmt | Fix pending Fix deferred | ||
| Red Hat Enterprise Linux 8 | libgit2 | Fix pending Fix deferred | ||
| Red Hat Enterprise Linux 8 | libgit2-devel | Fix pending Fix deferred | ||
| Alpine Linux 3.24 | libgit2 | Fixed | 1.9.6-r0 | ALPINE-CVE-2026-53585 |
| Alpine Linux 3.23 | libgit2 | Fixed | 1.9.6-r0 | ALPINE-CVE-2026-53585 |
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-27m5-gxxh-x79j
- https://github.com/libgit2/libgit2/commit/0cdfdd5fa8f8514c82413025e1e0808866cf7c30
- https://github.com/libgit2/libgit2/commit/c1896f06df22cc0ca5658df3a8f6cd7ede4cd6ae
- https://github.com/libgit2/libgit2/commit/dec22ac01ad9620c96b7b9ac3ef636ea46d43bed
- 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.