Vulnerability · Published Jan 6, 2025 · Assigned by GitHub_M

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

Critical 9.8

In plain English

A critical-severity argument injection in go-git from go-git. There are no confirmed reports of exploitation so far. The chance it is exploited in the next 30 days is estimated at 1.3% (higher than 70% of all known vulnerabilities). Fixed versions are available - upgrade the affected package.

Severity (CVSS 3.1)9.8Critical
Exploit odds (30 days)1.3%top 29.9% of all CVEs
Exploited in the wildNo reportsCISA SSVC: none
Attack toolingNoneno public tooling known

Official description

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.

Affected packages & fixed versions

EcosystemPackageFixed inAdvisory
AlmaLinux:8grafana9.2.10-21.el8_10ALSA-2025:0401
AlmaLinux:8grafana-selinux9.2.10-21.el8_10ALSA-2025:0401
Debian:12golang-github-go-git-go-gitno fix listedDEBIAN-CVE-2025-21613
Debian:13golang-github-go-git-go-git5.13.2-1DEBIAN-CVE-2025-21613
Debian:14golang-github-go-git-go-git5.13.2-1DEBIAN-CVE-2025-21613
Gogithub.com/go-git/go-git/v4no fix listedGO-2025-3368
Gogithub.com/go-git/go-git/v55.13.0GO-2025-3368
Gogithub.com/go-git/go-git/v55.13.0GHSA-v725-9546-7q7m
Gogopkg.in/src-d/go-git.v4no fix listedGO-2025-3368
Gogopkg.in/src-d/go-git.v4no fix listedGHSA-v725-9546-7q7m
Rocky Linux:8grafana0:9.2.10-21.el8_10RLSA-2025:0401

Affected products (as reported)

VendorProductVersions
go-git go-git >= 4.0.0, < 5.13.0

Weakness: CWE-88 · Vector: CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H

References