CVE-2025-21614 — src-d/go-git.v4
HIGHCVE-2025-21614 is a high-severity (CVSS 7.5) Uncontrolled Resource Consumption vulnerability in gopkg.in/src-d/go-git.v4. A fix is available for gopkg.in/src-d/go-git.v4 — see the affected versions and patch details below.
go-git clients vulnerable to DoS via maliciously crafted Git server replies
Exploitation Status
No confirmed exploitation observed yet
- CISA assesses this as automatable — exploitation doesn’t require manual, per-target effort, which raises the odds of mass scanning and opportunistic attacks.
- CISA’s own triage has not observed active exploitation or public proof-of-concept code for this CVE as of its last assessment.
Exploitation and automatability from CISA’s SSVC triage for CVE-2025-21614.
EPSS Exploitation Probability
Probability of exploitation in the next 30 days, from FIRST.org EPSS.
How urgent is this, really
Where this sits among everything scored
Real-World Exposure
gopkg.in/src-d/go-git.v4🐹github.com/go-git/go-git/v5🐹github.com/go-git/go-gitReal-time download stats are indexed for npm and PyPI packages. This vulnerability affects Go packages — download data is not available via public APIs for these ecosystems.
Description
Impact
A 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.
This is a go-git implementation issue and does not affect the upstream git cli.
Patches
Users running versions of go-git from v4 and above are recommended to upgrade to v5.13 in order to mitigate this vulnerability.
Workarounds
In 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.
Credit
Thanks to Ionut Lalu for responsibly disclosing this vulnerability to us.
Affected Packages
| Ecosystem | Package | Vulnerable range | Fix |
|---|---|---|---|
| 🐹Go | gopkg.in/src-d/go-git.v4 | ≥ 4.0.0 | No fix |
| 🐹Go | github.com/go-git/go-git/v5 | all versions | 5.13.0go get github.com/go-git/go-git/v5@v5.13.0 |
| 🐹Go | github.com/go-git/go-git | ≥ 4.0.0 | No fix |
Affected Products
go-gitgo-git_projectDetection & mitigation playbook
Open-source dependencyDetect
Scan your dependency tree (package-lock.json, pnpm-lock.yaml, requirements.txt, go.sum, etc.) for gopkg.in/src-d/go-git.v4, including transitive dependencies — a direct dependency you never call can still pull in a vulnerable version.
Fix
A fix is available for CVE-2025-21614; check the affected-versions list above or the advisory for the patched release of gopkg.in/src-d/go-git.v4, then make sure no transitive dependency still pins the vulnerable range.
Workarounds
Cap what an attacker can consume: apply request size, rate and timeout limits in front of the affected component, and run it with memory and CPU limits so exhaustion degrades one worker rather than the whole service.
Fixing This On Your OS
If you run this on a Linux distribution, patch through your package manager against the distro's own security advisory below — it tracks the exact backported fix for your release, which can ship on a different timeline (and sometimes a different severity) than the upstream project.
IMPORTANT: Red Hat products that ship or use the vulnerable go-git client behavior are affected by a denial-of-service vulnerability in go-git clients. An attacker can provide specially crafted replies from a Git server to a go-git client, causing resource exhaustion and potentially making the client unavailable; the…
Mitigation for this issue is either not available or the currently available options do not meet the Red Hat Product Security criteria comprising ease of use and deployment, applicability to widespread installation base, or stability.Source: Red Hat security advisory for CVE-2025-21614 (CC BY 4.0)
| Product | Fixed in | Advisory |
|---|---|---|
| Red Hat Advanced Cluster Security 4.4 | advanced-cluster-security/rhacs-main-rhel8:4.4.8-2 | RHSA-2025:1468 |
| Red Hat Advanced Cluster Security 4.5 | advanced-cluster-security/rhacs-main-rhel8:4.5.6-2 | RHSA-2025:1334 |
| Red Hat Advanced Cluster Security 4.6 | advanced-cluster-security/rhacs-central-db-rhel8:4.6.2-2 | RHSA-2025:0907 |
| Red Hat Enterprise Linux 8 | grafana-0:9.2.10-21.el8_10 | RHSA-2025:0401 |
| Red Hat Enterprise Linux 9.4 Extended Update Support | grafana-0:9.2.10-21.el9_4 | RHSA-2025:0662 |
| Red Hat OpenShift Container Platform 4.16 | openshift4/ose-helm-rhel9-operator:v4.16.0-202502130836.p0.g26e182e.assembly.stream.el9 | RHSA-2025:1704 |
| Red Hat OpenShift Container Platform 4.17 | openshift4/oc-mirror-plugin-rhel9:v4.17.0-202501221434.p0.g39bedc7.assembly.stream.el9 | RHSA-2025:0654 |
| Red Hat OpenShift Container Platform 4.17 | openshift4/ose-helm-rhel9-operator:v4.17.0-202502051104.p0.g61a705e.assembly.stream.el9 | RHSA-2025:1119 |
Frequently Asked Questions
Is CVE-2025-21614 in your dependencies?
Find it across Go, including transitive dependencies.