# CVE-2026-34165: go-git denial of service via crafted .idx file

Source: https://junglewise.ai/threats/cve-2026-34165-go-git-denial-of-service-via-crafted-idx-file  
Publisher: Junglewise Threat Intelligence, https://junglewise.ai/threats  
Published: 2026-03-31. Updated: 2026-07-24  
License: CC BY 4.0 with a link back

CVE-2026-34165 · Severity: medium · CVSS 5 · Published 2026-03-31

go-git is a software library used by developers to integrate Git functionality into Go-based applications. A vulnerability in how the library handles specific Git index files could allow an attacker with local access to crash the application by exhausting its memory. This results in a denial-of-service, potentially disrupting development workflows or services that rely on the library to process repository data.

Technologies: [github.com/go-git/go-git (Go)](https://junglewise.ai/threats/technologies/github-com-go-git-go-git), [github.com/go-git/go-git/v4 (Go)](https://junglewise.ai/threats/technologies/github-com-go-git-go-git-v4), [github.com/go-git/go-git/v5 (Go)](https://junglewise.ai/threats/technologies/github-com-go-git-go-git-v5). Vendors: [Go](https://junglewise.ai/threats/vendors/go).

## Quick answers

**Is CVE-2026-34165 exploited in the wild?** No. Junglewise Threat Intelligence has no report of CVE-2026-34165 being exploited in the wild.

**How severe is CVE-2026-34165?** Medium severity, with a CVSS score of 5, published 31 March 2026.

**Which products and versions are affected?** github.com/go-git/go-git (Go) SEMVER:introduced=0; github.com/go-git/go-git/v4 (Go) SEMVER:introduced=0; github.com/go-git/go-git/v5 (Go) SEMVER:introduced=5.0.0,fixed=5.17.1.

**Is there a fix for CVE-2026-34165?** Yes. github.com/go-git/go-git/v5 (Go): upgrade to 5.17.1 or later. Junglewise finds every place you run it, drafts the upgrade and applies it once you approve.

**How is CVE-2026-34165 attacked?** It is attacked with local access, in a software library.

**Am I affected by CVE-2026-34165?** Check whether you run github.com/go-git/go-git (Go), github.com/go-git/go-git/v4 (Go) or github.com/go-git/go-git/v5 (Go) at an affected version. Junglewise does that check for you around the clock: connect your code, cloud and domains, and it matches new vulnerabilities like this one against what you actually run and tells you when one reaches you.

## How to fix

- github.com/go-git/go-git/v5 (Go): upgrade to 5.17.1 or later

  ```sh
  go get github.com/go-git/go-git/v5@v5.17.1
  ```


## Technical details

A vulnerability exists in go-git's handling of Git index (.idx) files due to an integer underflow (CWE-191) and lack of resource limits (CWE-770). By providing a maliciously crafted .idx file, an attacker can trigger excessive memory allocation, leading to a denial-of-service (DoS) via memory exhaustion. Exploitation requires the attacker to have local write access to the .git directory of a repository to place or modify the .idx file, and requires the victim to interact with the repository using the vulnerable library. The issue is rooted in the plumbing/format/idxfile component and has been addressed in version 5.17.1 by improving version and fanout checks.

## Affected products

- go-git project go-git >= 5.0.0, < 5.17.1

## Identifiers

- CVE-2026-34165
- GHSA-jhf3-xxhw-2wpp
- GO-2026-4910

## Timeline

- 2026-03-29: patched: Version 5.17.1 released.
- 2026-03-31: disclosed: Public advisory published.

## References

- [https://github.com/go-git/go-git/releases/tag/v5.17.1](https://github.com/go-git/go-git/releases/tag/v5.17.1)
- [https://github.com/go-git/go-git/security/advisories/GHSA-jhf3-xxhw-2wpp](https://github.com/go-git/go-git/security/advisories/GHSA-jhf3-xxhw-2wpp)

## Related threats

- [go-git path traversal via malicious reference names](https://junglewise.ai/threats/cve-2026-71557-go-git-path-traversal-via-malicious-reference-names)
- [go-git symlink traversal in worktree operations](https://junglewise.ai/threats/cve-2026-71556-go-git-symlink-traversal-in-worktree-operations)
- [GO-2026-5693 - Go-git: Malformed Git object data may cause panics or resource exhaustion in github.com/go-git/go-git](https://junglewise.ai/threats/go-2026-5693-go-git-malformed-git-object-data-may-cause-panics-or-9c82fa09)
- [go-git DoS via malformed Git object data](https://junglewise.ai/threats/go-git-dos-via-malformed-git-object-data-a3075e9b)
- [go-git path traversal via crafted repository data](https://junglewise.ai/threats/cve-2026-45571-go-git-path-traversal-via-crafted-repository-data)
