CVE-2021-28955: Arbitrary code execution due to an uncontrolled search path for the git binary
9.8
CVSS Score
3.1
Basic Information
CVE ID
GHSA ID
EPSS Score
0.65398%
CWE
Published
5/25/2021
Updated
10/2/2023
KEV Status
No
Technology
Go
Technical Details
CVSS Vector
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H
Package Name | Ecosystem | Vulnerable Versions | First Patched Version |
---|---|---|---|
github.com/MichaelMure/git-bug | go | < 0.7.2 | 0.7.2 |
Vulnerability Intelligence
Miggo AI
Root Cause Analysis
The vulnerability stems from insecure PATH
search when executing git binaries. The patch replaces os/exec.Command
with execabs.Command
to prevent current directory precedence. The modified runGitCommandWithIO
function was the execution point for git commands, making it the vulnerable entry point prior to patching. The function signature matches Go's method naming convention (package.(*Struct).Method
) and would appear in stack traces when executing external commands.