# CVE-2026-33762: go-git out-of-bounds read in Git index v4 decoder

Source: https://junglewise.ai/threats/cve-2026-33762-go-git-out-of-bounds-read-in-git-index-v4-decoder  
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-33762 · Severity: low · CVSS 3.1 · Published 2026-03-31

go-git is a software library used by developers to build Git-related features into their applications. A flaw in how the library reads specific Git index files allows a specially crafted file to crash the application. This could lead to a denial-of-service where the application stops responding or shuts down unexpectedly when processing a malicious repository.

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-33762 exploited in the wild?** No. Junglewise Threat Intelligence has no report of CVE-2026-33762 being exploited in the wild.

**How severe is CVE-2026-33762?** Low severity, with a CVSS score of 3.1, 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) <= 5.17.0, SEMVER:introduced=0,fixed=5.17.1.

**Is there a fix for CVE-2026-33762?** 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-33762 attacked?** It is attacked with local access, in a software library.

**Am I affected by CVE-2026-33762?** 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 index decoder for Git index format version 4 (CWE-129). The decoder fails to validate the path name prefix length before applying it to previously decoded path names during delta compression processing. An attacker with the ability to provide a maliciously crafted .git/index file can trigger an out-of-bounds slice operation. This results in a Go runtime panic, leading to a denial-of-service (DoS) if the application does not implement panic recovery. The issue is specific to index format v4; versions v2 and v3 are unaffected. The vulnerability is addressed in version 5.17.1.

## Affected products

- go-git project go-git < 5.17.1

## Identifiers

- CVE-2026-33762
- GHSA-gm2x-2g9h-ccm8
- GO-2026-4909

## Timeline

- 2026-03-29: patched: Version 5.17.1 released
- 2026-03-31: advisory: GitHub Security Advisory published
- 2026-03-31: disclosed: CVE-2026-33762 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-gm2x-2g9h-ccm8](https://github.com/go-git/go-git/security/advisories/GHSA-gm2x-2g9h-ccm8)

## 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)
