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.
The vulnerability is revealed exclusively when using the file transport protocol, which is the only one that invokes external git binaries as subprocesses (shell out). An attacker can craft input in such a way as to pass arbitrary arguments or flags to the git-upload-pack call that are not expected by the library. Lack of proper argument sanitization before passing them to an external process leads to successful exploitation.
Successful exploitation of the vulnerability allows an attacker to set arbitrary flags for the git-upload-pack command, which may lead to unauthorized data access, modification, or availability disruption of data handled by the library.
Update the go-git library to version 5.13.0 or later, in which the vulnerability has been fixed. If immediate update is not possible, avoid using the file transport protocol in environments exposed to untrusted input data.
The go-git library (Go-Git project) in all versions prior to v5.13.0, when using the file transport protocol.
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:ClearGo Git Project Go Git
APPGo-Git Project< 5.13.0
Related vulnerabilities
Path Traversal w go-git umożliwiający RCE (CVE-2023-49569)
go-git is an extensible git implementation library written in pure Go. Prior to 5.19.0 and 6.0.0-alpha.3, go-g...
go-git is a highly extensible git implementation library written in pure Go. A denial of service (DoS) vulnera...
A denial of service (DoS) vulnerability was discovered in go-git versions prior to v5.11. This vulnerability a...
go-git to rozszerzalna biblioteka implementacji Git napisana w czystym Go. Przed wersjami 5.19.1 i 6.0.0-alpha...