Advisory Database
  • Advisories
  • Dependency Scanning
  1. golang
  2. ›
  3. github.com/go-git/go-git/v5
  4. ›
  5. CVE-2026-33762

CVE-2026-33762: go-git missing validation decoding Index v4 files leads to panic

March 30, 2026 (updated November 2, 2026)

go-git’s index decoder for format version 4 fails to validate the path name prefix length before applying it to the previously decoded path name. A maliciously crafted index file can trigger an out-of-bounds slice operation, resulting in a runtime panic during normal index parsing.

This issue only affects Git index format version 4. Earlier formats (go-git supports only v2 and v3) are not vulnerable to this issue.

An attacker able to supply a crafted .git/index file can cause applications using go-git to panic while reading the index. If the application does not recover from panics, this results in process termination, leading to a denial-of-service (DoS) condition.

Exploitation requires the ability to modify or inject a Git index file within the local repository in disk. This typically implies write access to the .git directory.

References

  • github.com/advisories/GHSA-gm2x-2g9h-ccm8
  • github.com/go-git/go-git/commit/e9b65df44cb97faeba148b47523a362beaecddf9
  • github.com/go-git/go-git/releases/tag/v5.17.1
  • github.com/go-git/go-git/security/advisories/GHSA-gm2x-2g9h-ccm8
  • nvd.nist.gov/vuln/detail/CVE-2026-33762

Code Behaviors & Features

Detect and mitigate CVE-2026-33762 with GitLab Dependency Scanning

Secure your software supply chain by verifying that all open source dependencies used in your projects contain no disclosed vulnerabilities. Dependency Scanning using SBOM also detects vulnerabilities from proprietary advisories that this site does not include. Learn more about Dependency Scanning using SBOM →

Affected versions

All versions before 5.17.1

Fixed versions

  • 5.17.1

Solution

Upgrade to version 5.17.1 or above.

Impact 2.8 LOW

CVSS:3.1/AV:L/AC:L/PR:L/UI:R/S:U/C:N/I:N/A:L

Learn more about CVSS

Weakness

  • CWE-129: Improper Validation of Array Index

Source file

go/github.com/go-git/go-git/v5/CVE-2026-33762.yml

Spotted a mistake? Edit the file on GitLab.

  • Site Repo
  • About GitLab
  • Terms
  • Privacy Statement
  • Contact

Page generated Tue, 10 Nov 2026 12:16:57 +0000.