Vulnerability Assessment
| Weakness |
CWE
OWASP Top 10:2025
A05:2025 - Injection
ASVS 5.0
V2 - Validation and Business Logic Array index validation
|
| Impact | This vulnerability presents low real-world risk despite its clear technical merit. The CVSS score of 2.8 with vector CVSS:3.1/AV:L/AC:L/PR:L/UI:R/S:U/C:N/I:N/A:L correctly reflects multiple limiting factors: attack vector is local (AV:L), requiring direct filesystem access; privileges required are low (PR:L), but user interaction is mandatory (UI:R); and impact is availability only (A:L), with no confidentiality or integrity compromise. The EPSS score and exploitation probability are not provided in available data. No CISA KEV confirmation of active exploitation is present, and no public exploit code is referenced. The vulnerability requires an attacker to already possess write access to the target repository's .git directory, which is a significant precondition typically reserved for repository collaborators, CI/CD systems, or compromised development machines. For applications designed to handle panics gracefully or running in sandboxed environments, the practical impact is further reduced. Organizations using go-git should prioritize patching in development and build environments where untrusted repositories may be cloned, but the risk is substantially lower than network-based vulnerabilities. |
| Exploit ScenarioDerived | An attacker with write access to a shared or CI/CD repository crafts a malicious .git/index file using Git index format version 4 with an invalid path prefix length field. When a go-git application (or a CI/CD pipeline using go-git) attempts to read the index-such as during a git clone, status, or diff operation-the decoder encounters the malformed prefix length and attempts an out-of-bounds slice operation on a previously decoded path name, triggering a runtime panic. If the application does not recover from the panic, the process terminates, resulting in denial of service. No public exploit code has been identified at time of analysis, and successful exploitation requires local filesystem write access combined with triggering the affected code path. |
Get an e-mail when this CVE is exploited, patched or re-scored. Free account.
Alert meAnalysisAIv1 – Mar 30, 2026
Denial-of-service vulnerability in go-git v5 and earlier versions allows local attackers with write access to the repository to craft a malicious Git index file (format version 4) that triggers an out-of-bounds slice operation during parsing, causing application panic and process termination. The vulnerability requires local disk write access to the .git directory and user interaction (file opening), making it a low-severity but exploitable DoS vector for applications that do not gracefully handle panics. Patch versions v5.17.1 and v6 are available.
RemediationAI
Users should upgrade go-git to version v5.17.1 or later, or migrate to the latest v6 pseudo-version. In Go projects using go.mod, run go get -u github.com/go-git/go-git/v5@v5.17.1 or go get github.com/go-git/go-git/v6@latest. No known workarounds exist to mitigate the vulnerability short of upgrading, though applications may implement panic recovery mechanisms (defer/recover) to prevent process termination when parsing untrusted Git repositories. Detailed remediation guidance is available in the official advisory at https://github.com/advisories/GHSA-gm2x-2g9h-ccm8.
Affected VersionsENISA
Affected Packages
Source: OSV (Open Source Vulnerabilities)
Affects your stack
Affects 4 packages in go, euvd
Checking this CVE against your own stacks and servers is part of the Basic plan and up.
Technical ContextAI · show details
go-git is a pure Go implementation of the Git version control system that includes an index file parser supporting Git index format versions 2, 3, and 4. The vulnerability exists in the format version 4 decoder, which processes delta-compressed path names using a prefix-length encoding scheme. The decoder fails to validate that the decoded prefix length is within the bounds of the previously decoded path name before performing a slice operation on that path. This triggers Go's runtime bounds check, resulting in a panic rather than silent data corruption. The root cause is an insufficient input validation error (CWE-129: Improper Validation of Array Index) in the index parsing logic. The affected CPE is pkg:go/github.com_go-git_go-git_v5, indicating Go module imports of the go-git library at version 5 and earlier minor versions.
Know when the next one hits your stack
- Watch products and get an email when something new is published
- Check this CVE against your own stack and servers
- Exploit and PoC references, threat intelligence from 22 sources
No credit card · 7-day full trial
Severity by source
AV:L/AC:L/PR:L/UI:R/S:U/C:N/I:N/A:L
Primary rating from Vendor (https://github.com/go-git/go-git) · only source for this CVE.
CVSS VectorVendor: https://github.com/go-git/go-git
Lifecycle Timeline
2DescriptionCVE.org
Impact
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.
Patches
Users should upgrade to v5.17.1, or the latest v6 pseudo-version, in order to mitigate this vulnerability.
Credit
go-git maintainers thank @kq5y for finding and reporting this issue privately to the go-git project.
Threat Intelligence Overview
How this decision was reached
The engine reads each signal below and applies a fixed list of rules from top to bottom. The first rule that matches sets the recommended action – like a statement, every line is shown.
What every action level means
SSVC AssessmentENISA
Priority Score
Attack Technique
A buffer overflow occurs when a program writes more data to a memory buffer than it was allocated to hold, causing the excess data to spill into adjacent memory regions.
EUVD-2026-17443
GHSA-gm2x-2g9h-ccm8
NVD
CVE.org
EPSS
Vulnrichment
VulDB
Exploit-DB