First published: Mon Jan 06 2025(Updated: )
### 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.
Credit: security-advisories@github.com security-advisories@github.com
Affected Software | Affected Version | How to fix |
---|---|---|
go/github.com/go-git/go-git/v5 | <5.13.0 | 5.13.0 |
go/gopkg.in/src-d/go-git.v4 | >=4.0.0<=4.13.1 | |
go-git | <5.13.0 |
Sign up to SecAlerts for real-time vulnerability data matched to your software, aggregated from hundreds of sources.
The severity of CVE-2025-21613 has not been officially assigned but is considered significant due to the potential for argument injection in git-upload-pack.
To fix CVE-2025-21613, upgrade to `go-git` version 5.13.0 or later.
CVE-2025-21613 affects `go-git` versions before v5.13 and `gopkg.in/src-d/go-git.v4` versions from 4.0.0 to 4.13.1.
If exploited, CVE-2025-21613 could allow an attacker to set arbitrary values to git-upload-pack flags, potentially affecting repository interactions.
CVE-2025-21613 is considered a remote vulnerability as it can be exploited through networked interactions with git repositories.