Vulnerabilities in pkg:golang/gopkg.in/src-d/go-git.v4
PACKAGECVE-2025-21614 is a HIGH (CVSS 7.5) denial of service vulnerability (CWE-400: Uncontrolled Resource Consumption) affecting Gopkg.in/src d/go git.v4 libraries in the Go ecosystem. The issue involves go-git clients vulnerable to dos via maliciously crafted git server replies. Remediation is available by upgrading affected packages to version 5.13.0.
pkg:golang/gopkg.in/src-d/go-git.v4
Vulnerability advisories affecting package pkg:golang/gopkg.in/src-d/go-git.v4. Select an advisory below to view technical details or fixes.
| Advisory ID | CVE / NVD | Severity | Summary |
|---|---|---|---|
| GHSA-r9px-m959-cxf4 | CVE-2025-21614 | HIGH | go-git clients vulnerable to DoS via maliciously crafted Git server replies |
| GHSA-v725-9546-7q7m | CVE-2025-21613 | CRITICAL | go-git has an Argument Injection via the URL field |
| GHSA-449p-3h89-pw88 | CVE-2023-49569 | CRITICAL | Maliciously crafted Git server replies can lead to path traversal and RCE on go-git clients |
| GHSA-mw99-9chc-xw7r | CVE-2023-49568 | HIGH | Maliciously crafted Git server replies can cause DoS on go-git clients |
CVE-2025-21614 at a Glance
Security Impact
CVSS: 7.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:N/S:U/C:N/I:N/A:H).
How to Fix CVE-2025-21614
To remediate this vulnerability, upgrade all affected Gopkg.in/src d/go git.v4 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 gopkg.in/src-d/go-git.v4 to Latest secure release
Upgrade github.com/go-git/go-git/v5 to 5.13.0
Upgrade github.com/go-git/go-git to Latest secure release
Run the following command in your project directory to verify that all resolved dependencies use the patched release:
inspect dependencies for gopkg.in/src-d/go-git.v4
How to Check if You Are Affected
To determine whether your application is affected by CVE-2025-21614, inspect your project dependencies for Gopkg.in/src d/go git.v4:
inspect dependencies for gopkg.in/src-d/go-git.v4
Analyze the terminal output to locate any version of Gopkg.in/src d/go git.v4 in your dependency tree. If any resolved version matches the vulnerable ranges listed in the table below (for example, versions earlier than 5.13.0), 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 Gopkg.in/src d/go git.v4, 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
CVE-2025-21614 Affected Gopkg.in/src d/go git.v4 Versions
3 component(s)| Product / Package | Ecosystem | Affected Versions | Fixed Version |
|---|---|---|---|
|
gopkg.in/src-d/go-git.v4
|
Go |
≥ 4.0.0
≤ 4.13.1
|
|
|
github.com/go-git/go-git/v5
|
Go |
< 5.13.0
|
5.13.0
|
|
github.com/go-git/go-git
|
Go |
≥ 4.0.0
≤ 4.13.1
|
|
References
Frequently Asked Questions
What is CVE-2025-21614?
Which Gopkg.in/src d/go git.v4 versions are affected?
What version fixes CVE-2025-21614?
Is gopkg.in/src-d/go-git.v4 affected?
Is github.com/go-git/go-git/v5 affected?
What is the CVSS score of CVE-2025-21614?
What CWE is associated with CVE-2025-21614?
How can I check Go dependencies for CVE-2025-21614?
Machine-readable OSV JSON
OSV v1.5 Schema
{
"schema_version" : "1.4.0",
"id" : "GHSA-r9px-m959-cxf4",
"modified" : "2025-08-27T14:24:37Z",
"published" : "2025-01-06T16:20:28Z",
"aliases" : [ "CVE-2025-21614" ],
"summary" : "go-git clients vulnerable to DoS via maliciously crafted Git server replies",
"details" : "### Impact\nA denial of service (DoS) vulnerability was discovered in go-git versions prior to `v5.13`. This vulnerability allows an attacker to perform denial of service attacks by providing specially crafted responses from a Git server which triggers resource exhaustion in `go-git` clients. \n\nThis is a `go-git` implementation issue and does not affect the upstream `git` cli.\n\n### Patches\nUsers running versions of `go-git` from `v4` and above are recommended to upgrade to `v5.13` in order to mitigate this vulnerability.\n\n### Workarounds\nIn cases where a bump to the latest version of `go-git` is not possible, we recommend limiting its use to only trust-worthy Git servers.\n\n## Credit\nThanks to Ionut Lalu for responsibly disclosing this vulnerability to us.",
"severity" : [ {
"type" : "CVSS_V3",
"score" : "CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H"
} ],
"affected" : [ {
"package" : {
"ecosystem" : "Go",
"name" : "gopkg.in/src-d/go-git.v4"
},
"ranges" : [ {
"type" : "ECOSYSTEM",
"events" : [ {
"introduced" : "4.0.0"
}, {
"last_affected" : "4.13.1"
} ]
} ]
}, {
"package" : {
"ecosystem" : "Go",
"name" : "github.com/go-git/go-git/v5"
},
"ranges" : [ {
"type" : "ECOSYSTEM",
"events" : [ {
"introduced" : "0"
}, {
"fixed" : "5.13.0"
} ]
} ]
}, {
"package" : {
"ecosystem" : "Go",
"name" : "github.com/go-git/go-git"
},
"ranges" : [ {
"type" : "ECOSYSTEM",
"events" : [ {
"introduced" : "4.0.0"
}, {
"last_affected" : "4.13.1"
} ]
} ]
} ],
"references" : [ {
"type" : "WEB",
"url" : "https://github.com/go-git/go-git/security/advisories/GHSA-r9px-m959-cxf4"
}, {
"type" : "ADVISORY",
"url" : "https://nvd.nist.gov/vuln/detail/CVE-2025-21614"
}, {
"type" : "PACKAGE",
"url" : "https://github.com/go-git/go-git"
} ],
"database_specific" : {
"cwe_ids" : [ "CWE-20", "CWE-400", "CWE-770" ],
"severity" : "HIGH",
"github_reviewed" : true,
"github_reviewed_at" : "2025-01-06T16:20:28Z",
"nvd_published_at" : "2025-01-06T17:15:47Z"
}
}