# CVE-2026-53585: libgit2: Unbounded Memory Allocation via Delta Object Result-Size Header

> Attackers can cause memory exhaustion and denial of service in applications using libgit2 by supplying malicious pack data with oversized delta headers.

- **Severity:** Medium 5.3 (`CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:L`)
- **Exploited in the wild:** Not known
- **Login needed:** Not needed
- **Attackable:** Over the internet
- **Victim action needed:** Not needed
- **Fix available:** Yes
- **Published:** 20 Aug 2026
- **Updated:** 25 Aug 2026
- **Also known as:** AZL-96965, BELL-CVE-2026-53585, DEBIAN-CVE-2026-53585, ECHO-11a9-f023-aa1d, GHSA-27m5-gxxh-x79j, JLSEC-2026-1371, MINI-4vj3-whm6-3845

## What is CVE-2026-53585?

CVE-2026-53585 is a medium-severity denial of service vulnerability in libgit2, published on 20 Aug 2026. An attacker can exploit it over the internet without logging in, with no action from the victim.

### Official description

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.

Weakness: CWE-770 (Allocation of Resources Without Limits or Throttling)

## Which versions are affected by CVE-2026-53585?


## How do I fix CVE-2026-53585?

Upgrade to a fixed version.

## Is CVE-2026-53585 being exploited?

It is not confirmed as exploited in the wild, but public exploit code for CVE-2026-53585 exists.

## Fix prompt for AI coding agents

```text
Check this codebase for CVE-2026-53585 and fix it if it is affected.

What it is: CVE-2026-53585 is a medium-severity denial of service vulnerability in libgit2, published on 20 Aug 2026. An attacker can exploit it over the internet without logging in, with no action from the victim.
Exploitation: It is not confirmed as exploited in the wild, but public exploit code for CVE-2026-53585 exists.

Affected product: libgit2. No package-level version data is available, so check the vendor advisory linked from the reference page.

Task:
1. Search the dependency manifests and lockfiles (for example package.json, package-lock.json, requirements.txt, poetry.lock, uv.lock, pom.xml, build.gradle, go.mod, Cargo.lock, Gemfile.lock) and any Dockerfiles for the affected packages, including transitive dependencies.
2. If an affected version is in use, upgrade it to the fixed version for its release line with the project's package manager, so the lockfile is regenerated. Prefer the smallest upgrade that fixes it.
3. If there is no fix, or the upgrade would break the build, do not guess: explain the risk and the safest workaround instead.
4. Run the tests and summarise what changed and why.
5. If nothing in the project is affected, say so and change nothing.

Reference: https://insights.sbomify.com/CVE-2026-53585/ (Markdown: https://insights.sbomify.com/CVE-2026-53585/index.md)
```

## Sources

- CVE record: https://www.cve.org/CVERecord?id=CVE-2026-53585
- NVD: https://nvd.nist.gov/vuln/detail/CVE-2026-53585
- OSV: https://osv.dev/vulnerability/CVE-2026-53585

---
From sbomify Insights: https://insights.sbomify.com/CVE-2026-53585/
Summaries are generated and may contain mistakes; the official description above is the record.
