GHSA-37cx-329c-33x3

Suggest an improvement
Source
https://github.com/advisories/GHSA-37cx-329c-33x3
Import Source
https://github.com/github/advisory-database/blob/main/advisories/github-reviewed/2026/02/GHSA-37cx-329c-33x3/GHSA-37cx-329c-33x3.json
JSON Data
https://api.osv.dev/v1/vulns/GHSA-37cx-329c-33x3
Aliases
Downstream
Related
Published
2026-02-10T00:28:53Z
Modified
2026-02-10T12:58:52.276562Z
Severity
  • 4.3 (Medium) CVSS_V3 - CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:N/I:L/A:N CVSS Calculator
Summary
go-git improperly verifies data integrity values for .idx and .pack files
Details

Impact

A vulnerability was discovered in go-git whereby data integrity values for .pack and .idx files were not properly verified. This resulted in go-git potentially consuming corrupted files, which would likely result in unexpected errors such as object not found.

For context, clients fetch <code>packfiles</code> from upstream Git servers. Those files contain a checksum of their contents, so that clients can perform integrity checks before consuming it. The pack indexes (.idx) are generated locally by go-git, or the git cli, when new .pack files are received and processed. The integrity checks for both files were not being verified correctly.

Note that the lack of verification of the packfile checksum has no impact on the trust relationship between the client and server, which is enforced based on the protocol being used (e.g. TLS in the case of https:// or known hosts for ssh://). In other words, the packfile checksum verification does not provide any security benefits when connecting to a malicious or compromised Git server.

Patches

Users should upgrade to v5.16.5, or the latest v6 pseudo-version, in order to mitigate this vulnerability.

Workarounds

In case updating to a fixed version of go-git is not possible, users can run git fsck from the git cli to check for data corruption on a given repository.

Credit

Thanks @N0zoM1z0 for finding and reporting this issue privately to the go-git project.

Database specific
{
    "github_reviewed_at": "2026-02-10T00:28:53Z",
    "cwe_ids": [
        "CWE-354"
    ],
    "github_reviewed": true,
    "severity": "MODERATE",
    "nvd_published_at": "2026-02-09T23:16:05Z"
}
References

Affected packages

Go / github.com/go-git/go-git/v5

Package

Name
github.com/go-git/go-git/v5
View open source insights on deps.dev
Purl
pkg:golang/github.com/go-git/go-git/v5

Affected ranges

Type
SEMVER
Events
Introduced
0Unknown introduced version / All previous versions are affected
Fixed
5.16.5

Database specific

last_known_affected_version_range
"<= 5.16.4"
source
"https://github.com/github/advisory-database/blob/main/advisories/github-reviewed/2026/02/GHSA-37cx-329c-33x3/GHSA-37cx-329c-33x3.json"