GHSA-v725-9546-7q7m
go-git has an Argument Injection via the URL field
At a glance
- Published
- Updated
- CVE
- CVE-2025-21613
- Aliases
- GO-2025-3368
- CVSS_V3
- CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H
- CVSS_V4
- 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
Description
### 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](https://git-scm.com/docs/git-upload-pack). 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.
Affected packages
| Package | Versions |
|---|---|
| Go · gopkg.in/src-d/go-git.v4 | introduced 4.0.0, last affected 4.13.1 |
| Go · github.com/go-git/go-git/v5 | introduced 0, fixed 5.13.0 |
References
- https://github.com/go-git/go-git/security/advisories/GHSA-v725-9546-7q7m WEB
- https://nvd.nist.gov/vuln/detail/CVE-2025-21613 ADVISORY
- https://github.com/go-git/go-git PACKAGE
Sources
| Source | Licence |
|---|---|
| OSV.dev | CC-BY 4.0 — GitHub Advisory Database |