CVE-2025-21613: go-git has an Argument Injection via the URL field

Published Jan 6, 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. 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.

Other sources

go-git has an Argument Injection via the URL field

Microsoft

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.

NVD

Affected Software

9 affected componentsFixes available
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 project Go-git Go<5.13.0
IBM Edge Application Manager<=4.5
Microsoft azl3 packer 1.9.5-6
Microsoft cbl2 packer 1.9.5-7
Microsoft cbl2 packer 1.9.5-5
Microsoft cbl2 cri-o 1.22.3-12
Microsoft azl3 packer 1.9.5-5

Event History

Jan 6, 2025
CVE Published
via MITRE·04:13 PM
Data Sourced
via MITRE·04:13 PM
DescriptionWeakness
Advisory Published
via GitHub·04:16 PM
Data Sourced
via Red Hat·05:01 PM
DescriptionSeverityAffected Software
Data Sourced
via NVD·05:15 PM
DescriptionSeverityWeakness
Jan 16, 2025
Data Sourced
via Microsoft·08:00 AM
DescriptionSeverityWeakness
Data Sourced
via Microsoft·08:00 AM
Affected Software
Updated
via Microsoft·08:00 AM
Affected Software
Updated
via Microsoft·08:00 AM
SeverityAffected Software
Updated
via Microsoft·08:00 AM
DescriptionSeverity
Aug 20, 2025
Data Sourced
via IBM·12:00 AM
DescriptionAffected Software

Parent advisories

This vulnerability appears in the following advisories.

Free Weekly Intel

Don't miss critical vulnerabilities

Join thousands of security professionals who receive our weekly digest of trending CVEs, zero-days, and exploited vulnerabilities.

No spam. Unsubscribe anytime.

Frequently Asked Questions

1

What is the severity of CVE-2025-21613?

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.

2

How do I fix CVE-2025-21613?

To fix CVE-2025-21613, upgrade to `go-git` version 5.13.0 or later.

3

What versions are affected by CVE-2025-21613?

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.

4

What happens if CVE-2025-21613 is exploited?

If exploited, CVE-2025-21613 could allow an attacker to set arbitrary values to git-upload-pack flags, potentially affecting repository interactions.

5

Is CVE-2025-21613 a remote or local vulnerability?

CVE-2025-21613 is considered a remote vulnerability as it can be exploited through networked interactions with git repositories.

Contact

SecAlerts Pty Ltd.
132 Wickham Terrace
Fortitude Valley,
QLD 4006, Australia
info@secalerts.co
By using SecAlerts services, you agree to our services end-user license agreement. This website is safeguarded by reCAPTCHA and governed by the Google Privacy Policy and Terms of Service. All names, logos, and brands of products are owned by their respective owners, and any usage of these names, logos, and brands for identification purposes only does not imply endorsement. If you possess any content that requires removal, please get in touch with us.
© 2026 SecAlerts Pty Ltd.
ABN: 70 645 966 203, ACN: 645 966 203
CVE-2025-21613 - go-git has an Argument Injection via the URL field - SecAlerts