GHSA-w5pp-99ch-qj29: go-git Remote Code Execution Vulnerability
MODERATEGHSA-w5pp-99ch-qj29 is a MODERATE (CVSS 6.5) remote code execution vulnerability (CWE-400: Uncontrolled Resource Consumption) affecting go-git libraries in the Go ecosystem. The issue involves malformed git object data may cause panics or resource exhaustion. Remediation is available by upgrading affected packages to version 5.19.1, 6.0.0-alpha.4.
GHSA-w5pp-99ch-qj29 at a Glance
Security Impact
CVSS: 6.5
The security impact metrics below are parsed directly from the CVSS v3.1 vector string (CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:N/I:N/A:H).
How to Fix GHSA-w5pp-99ch-qj29
To remediate this vulnerability, upgrade all affected go-git dependencies to a patched release. Both direct and transitive dependencies should be checked, as frameworks or security libraries may pull in vulnerable versions transitively.
Upgrade github.com/go-git/go-git/v5 to 5.19.1
Upgrade github.com/go-git/go-git/v6 to 6.0.0-alpha.4
Run the following command in your project directory to verify that all resolved dependencies use the patched release:
inspect dependencies for github.com/go-git/go-git/v5
How to Check if You Are Affected
To determine whether your application is affected by GHSA-w5pp-99ch-qj29, inspect your project dependencies for go-git:
inspect dependencies for github.com/go-git/go-git/v5
Analyze the terminal output to locate any version of go-git in your dependency tree. If any resolved version matches the vulnerable ranges listed in the table below (for example, versions earlier than 5.19.1), your application is affected.
Note: Verify declared build manifests and deployed runtime container environments.
Technical Details
Vulnerability Mechanism & Technical Analysis
This vulnerability is classified under CWE-400: Uncontrolled Resource Consumption, where the product does not properly control the allocation and maintenance of a limited resource. In go-git, software state validation or input boundaries are circumvented during processing. Review the official source advisory statement below for specific affected components, classes, and reproduction details.
Source Advisory Statement
GHSA-w5pp-99ch-qj29 Affected go-git Versions
2 component(s)| Product / Package | Ecosystem | Affected Versions | Fixed Version |
|---|---|---|---|
|
github.com/go-git/go-git/v5
|
Go |
< 5.19.1
|
5.19.1
|
|
github.com/go-git/go-git/v6
|
Go |
< 6.0.0-alpha.4
|
6.0.0-alpha.4
|
References
Frequently Asked Questions
What is GHSA-w5pp-99ch-qj29?
Which go-git versions are affected?
What version fixes GHSA-w5pp-99ch-qj29?
Is github.com/go-git/go-git/v5 affected?
Is github.com/go-git/go-git/v6 affected?
What is the CVSS score of GHSA-w5pp-99ch-qj29?
What CWE is associated with GHSA-w5pp-99ch-qj29?
How can I check Go dependencies for GHSA-w5pp-99ch-qj29?
Machine-readable OSV JSON
OSV v1.5 Schema
{
"schema_version" : "1.4.0",
"id" : "GHSA-w5pp-99ch-qj29",
"modified" : "2026-05-29T19:43:27Z",
"published" : "2026-05-29T19:43:27Z",
"aliases" : [ ],
"summary" : "go-git: Malformed Git object data may cause panics or resource exhaustion",
"details" : "### Impact\nSeveral denial-of-service issues were identified in `go-git` when parsing maliciously crafted Git repository data.\n\nAn attacker may craft a malicious `.pack`, `.idx` or loose objects that causes an application using an affected version of `go-git` to panic or consume excessive resources.\n\nThis can lead to denial of service in applications that use `go-git` to clone, fetch, open, or otherwise process untrusted repositories or Git object data.\n\nExploitation requires the ability to alter read-only files such as `.pack` or `.idx` from the local repository's `.git/objects/pack/` directory. Alternatively, the user would need to be interacting with a malicious remote server, which is not recommended and exposes users to a broader class of security risks beyond this issue.\n\n### Patches\nUsers should upgrade to a patched version in order to mitigate this vulnerability. Versions prior to `v5` are likely to be affected, users are recommended to upgrade to a supported `go-git` version.\n\n### Credits\ngo-git thanks @kodareef5, @AyushParkara and @N0zoM1z0 for reporting this in four separate reports. 🙇",
"severity" : [ {
"type" : "CVSS_V3",
"score" : "CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:N/I:N/A:H"
} ],
"affected" : [ {
"package" : {
"ecosystem" : "Go",
"name" : "github.com/go-git/go-git/v5"
},
"ranges" : [ {
"type" : "ECOSYSTEM",
"events" : [ {
"introduced" : "0"
}, {
"fixed" : "5.19.1"
} ]
} ],
"database_specific" : {
"last_known_affected_version_range" : "<= 5.19.0"
}
}, {
"package" : {
"ecosystem" : "Go",
"name" : "github.com/go-git/go-git/v6"
},
"ranges" : [ {
"type" : "ECOSYSTEM",
"events" : [ {
"introduced" : "0"
}, {
"fixed" : "6.0.0-alpha.4"
} ]
} ],
"database_specific" : {
"last_known_affected_version_range" : "<= 6.0.0-alpha.3"
}
} ],
"references" : [ {
"type" : "WEB",
"url" : "https://github.com/go-git/go-git/security/advisories/GHSA-w5pp-99ch-qj29"
}, {
"type" : "PACKAGE",
"url" : "https://github.com/go-git/go-git"
} ],
"database_specific" : {
"cwe_ids" : [ "CWE-400" ],
"severity" : "MODERATE",
"github_reviewed" : true,
"github_reviewed_at" : "2026-05-29T19:43:27Z",
"nvd_published_at" : null
}
}