Ecosyste.ms: Advisories

An open API service providing security vulnerability metadata for many open source software ecosystems.

Security Advisories: GSA_kwCzR0hTQS12NzI1LTk1NDYtN3E3bc4ABC-k

go-git has an Argument Injection via the URL field

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.

Permalink: https://github.com/advisories/GHSA-v725-9546-7q7m
JSON: https://advisories.ecosyste.ms/api/v1/advisories/GSA_kwCzR0hTQS12NzI1LTk1NDYtN3E3bc4ABC-k
Source: GitHub Advisory Database
Origin: Unspecified
Severity: Critical
Classification: General
Published: 17 days ago
Updated: 17 days ago


CVSS Score: 9.8
CVSS vector: CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H

EPSS Percentage: 0.00043
EPSS Percentile: 0.11049

Identifiers: GHSA-v725-9546-7q7m, CVE-2025-21613
References: Repository: https://github.com/go-git/go-git
Blast Radius: 40.5

Affected Packages

go:github.com/go-git/go-git/v5
Dependent packages: 8,164
Dependent repositories: 13,417
Downloads:
Affected Version Ranges: < 5.13.0
Fixed in: 5.13.0
All affected versions: 5.0.0, 5.1.0, 5.2.0, 5.3.0, 5.4.0, 5.4.1, 5.4.2, 5.5.0, 5.5.1, 5.5.2, 5.6.0, 5.6.1, 5.7.0, 5.8.0, 5.8.1, 5.9.0, 5.10.0, 5.10.1, 5.11.0, 5.12.0
All unaffected versions: 5.13.0, 5.13.1
go:gopkg.in/src-d/go-git.v4
Dependent packages: 6,399
Dependent repositories: 7,932
Downloads:
Affected Version Ranges: >= 4.0.0, <= 4.13.1
No known fixed version
All affected versions: 4.0.0, 4.1.0, 4.1.1, 4.2.0, 4.2.1, 4.3.0, 4.3.1, 4.4.0, 4.4.1, 4.5.0, 4.6.0, 4.7.0, 4.7.1, 4.8.0, 4.8.1, 4.9.0, 4.9.1, 4.10.0, 4.11.0, 4.12.0, 4.13.0, 4.13.1