{"id":"CVE-2025-21613","aliases":["CVE-2025-21613","GHSA-v725-9546-7q7m","GO-2025-3368"],"related":["RHSA-2025:0401","RHSA-2025:0662","RHSA-2025:3344"],"kind":"vulnerability","state":"published","title":"go-git has an Argument Injection via the URL field","summary":"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.","summarySource":"cvelist","descriptions":[{"lang":"en","text":"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.","source":"cvelist"},{"lang":"en","text":"### Impact\nAn argument injection vulnerability was discovered in `go-git` versions prior to `v5.13`. \n\nSuccessful 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.\n\n### Affected versions\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 users to enforce restrict validation rules for values passed in the URL field.\n\n## Credit\nThanks to @vin01 for responsibly disclosing this vulnerability to us.","format":"markdown","source":"ghsa"},{"lang":"en","text":"Argument Injection via the URL field in github.com/go-git/go-git","format":"markdown","source":"go"},{"lang":"es","text":"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.","source":"nvd"}],"published":"2025-01-06T16:13:10.611Z","modified":"2026-11-23T21:12:29.663Z","severity":{"scorer":"GitHub_M","scheme":"CVSS:4.0","vector":"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","score":9.2,"rating":"CRITICAL"},"severities":[{"scorer":"GitHub_M","scheme":"CVSS:4.0","vector":"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","score":9.2,"rating":"CRITICAL"},{"scorer":"CISA-ADP","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H","score":9.8,"rating":"CRITICAL"},{"scorer":"GitHub","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H","score":9.8,"rating":"CRITICAL"},{"scorer":"GitHub","scheme":"CVSS:4.0","vector":"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","rating":"CRITICAL"}],"cwes":["CWE-88"],"affected":[{"ranges":[{"version":">= 4.0.0,  < 5.13.0","status":"affected"}],"vendor":"go-git","product":"go-git","source":"cvelist"},{"ranges":[{"type":"semver","introduced":"4.0.0","status":"affected","lastAffected":"4.13.1"}],"ecosystem":"Go","package":"gopkg.in/src-d/go-git.v4","purl":"pkg:golang/gopkg.in/src-d/go-git.v4","source":"ghsa"},{"ranges":[{"type":"semver","introduced":"0","status":"affected","fixed":"5.13.0"}],"ecosystem":"Go","package":"github.com/go-git/go-git/v5","purl":"pkg:golang/github.com/go-git/go-git/v5","source":"ghsa"},{"ranges":[{"type":"semver","introduced":"4.0.0","status":"affected"}],"ecosystem":"Go","package":"github.com/go-git/go-git/v4","purl":"pkg:golang/github.com/go-git/go-git/v4","source":"go"},{"ranges":[{"type":"semver","introduced":"0","status":"affected","fixed":"5.13.0"}],"ecosystem":"Go","package":"github.com/go-git/go-git/v5","purl":"pkg:golang/github.com/go-git/go-git/v5","source":"go"},{"ranges":[{"type":"semver","introduced":"4.0.0","status":"affected"}],"ecosystem":"Go","package":"gopkg.in/src-d/go-git.v4","purl":"pkg:golang/gopkg.in/src-d/go-git.v4","source":"go"},{"ranges":[{"status":"affected","fixed":"5.13.0"}],"vendor":"go-git_project","product":"go-git","cpe":"cpe:2.3:a:go-git_project:go-git:*:*:*:*:*:go:*:*","source":"nvd"}],"references":[{"url":"https://github.com/go-git/go-git/security/advisories/GHSA-v725-9546-7q7m","tags":["advisory","vendor-advisory","web","x-refsource-confirm"],"sources":["cvelist","ghsa","go","nvd"]},{"url":"https://nvd.nist.gov/vuln/detail/CVE-2025-21613","tags":["advisory"],"sources":["ghsa"]},{"url":"https://github.com/go-git/go-git","tags":["package"],"sources":["ghsa"]}],"credits":["@vin01"],"assigner":"GitHub_M","ssvc":{"scorer":"CISA-ADP","exploitation":"none","automatable":"no","technicalImpact":"total","date":"2025-01-06T16:38:34.120Z"},"sources":[{"source":"cvelist","name":"CVE List","id":"CVE-2025-21613","url":"https://www.cve.org/CVERecord?id=CVE-2025-21613","licence":"CVE Terms of Use","modified":"2025-01-06T16:45:02.671Z"},{"source":"ghsa","name":"GitHub Advisory Database","id":"GHSA-v725-9546-7q7m","url":"https://github.com/advisories/GHSA-v725-9546-7q7m","licence":"CC-BY-4.0","modified":"2026-09-10T03:50:22.222Z"},{"source":"go","name":"Go Vulnerability Database","id":"GO-2025-3368","url":"https://pkg.go.dev/vuln/GO-2025-3368","licence":"CC-BY-4.0","modified":"2026-11-23T21:12:29.663Z"},{"source":"nvd","name":"NVD","id":"CVE-2025-21613","url":"https://nvd.nist.gov/vuln/detail/CVE-2025-21613","licence":"Public domain","modified":"2026-06-17T08:43:51.353Z"}],"updatedAt":"2026-11-25T22:58:53.127Z","epss":{"score":0.01278,"percentile":0.70811,"date":"2026-12-01T12:00:22.000Z"}}