9.2critical
go-git has an Argument Injection via the URL field
- Severity
- 9.2critical CVSS:4.0 by GitHub_M
- Exploit likelihood
- 1.28% (higher than 70% of CVEs; EPSS, by FIRST)
- Published
- Last changed
- Assigned by
- GitHub_M
- Also known as
- GHSA-v725-9546-7q7mGO-2025-3368
Description
go-git is a highly extensible git implementation library written in pure Go. An argument injection vulnerability was discovered in go-git versions prior to v5.13. Successful exploitation of this vulnerability could allow an attacker to set arbitrary values to git-upload-pack flags. This only happens when the file transport protocol is being used, as that is the only protocol that shells out to git binaries. This vulnerability is fixed in 5.13.0.
Affected
| Product or package | Versions | Reported by |
|---|---|---|
| go-git go-git | >= 4.0.0, < 5.13.0 | CVE List |
| gopkg.in/src-d/go-git.v4 (Go) | from 4.0.0 up to 4.13.1, from 4.0.0 | GitHub Advisory Database, Go Vulnerability Database |
| github.com/go-git/go-git/v5 (Go) | before 5.13.0 | GitHub Advisory Database, Go Vulnerability Database |
| github.com/go-git/go-git/v4 (Go) | from 4.0.0 | Go Vulnerability Database |
| go-git_project go-git | before 5.13.0 | NVD |
All scores
| GitHub_M | 9.2critical CVSS:4.0 | CVSS:4.0/AV:N/AC:L/AT:P/PR:N/UI:N/VC:H/VI:H/VA:H/SC:N/SI:N/SA:N/U:Clear |
| CISA-ADP | 9.8critical CVSS:3.1 | CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H |
| GitHub | 9.8critical CVSS:3.1 | CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H |
| GitHub | critical CVSS:4.0 | CVSS:4.0/AV:N/AC:L/AT:P/PR:N/UI:N/VC:H/VI:H/VA:H/SC:N/SI:N/SA:N/E:X/CR:X/IR:X/AR:X/MAV:X/MAC:X/MAT:X/MPR:X/MUI:X/MVC:X/MVI:X/MVA:X/MSC:X/MSI:X/MSA:X/S:X/AU:X/R:X/V:X/RE:X/U:Clear |
Classification
SSVC (CISA-ADP): exploitation none, automatable no, technical impact total.
What each source says
CVE List
go-git is a highly extensible git implementation library written in pure Go. An argument injection vulnerability was discovered in go-git versions prior to v5.13. Successful exploitation of this vulnerability could allow an attacker to set arbitrary values to git-upload-pack flags. This only happens when the file transport protocol is being used, as that is the only protocol that shells out to git binaries. This vulnerability is fixed in 5.13.0.
GitHub Advisory Database
Impact
An argument injection vulnerability was discovered in go-git versions prior to v5.13.
Successful exploitation of this vulnerability could allow an attacker to set arbitrary values to git-upload-pack flags. This only happens when the file transport protocol is being used, as that is the only protocol that shells out to git binaries.
Affected versions
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 users to enforce restrict validation rules for values passed in the URL field.
Credit
Thanks to @vin01 for responsibly disclosing this vulnerability to us.
Go Vulnerability Database
Argument Injection via the URL field in github.com/go-git/go-git
NVD (es)
Go-git es una librería de implementación de Git altamente extensible escrita en Go puro. Se descubrió una vulnerabilidad de inyección de argumentos en versiones de Go-git anteriores a la v5.13. La explotación exitosa de esta vulnerabilidad podría permitir a un atacante establecer valores arbitrarios para los indicadores git-upload-pack. Esto solo sucede cuando se utiliza el protocolo de transporte de archivos, ya que es el único protocolo que realiza transferencias a binarios de Git. Esta vulnerabilidad se corrigió en la versión 5.13.0.
References
| https://github.com/go-git/go-git/security/advisories/GHSA-v725-9546-7q7m | advisory, vendor-advisory, web | |
| https://nvd.nist.gov/vuln/detail/CVE-2025-21613 | advisory | |
| https://github.com/go-git/go-git | package | |
Related
Sources
| Source | Record | Licence |
|---|---|---|
| CVE List | CVE-2025-21613 changed 2025-01-06 | CVE Terms of Use |
| GitHub Advisory Database | GHSA-v725-9546-7q7m changed 2026-09-10 | CC-BY-4.0 |
| Go Vulnerability Database | GO-2025-3368 changed 2026-11-23 | CC-BY-4.0 |
| NVD | CVE-2025-21613 changed 2026-06-17 | Public domain |