CVE-2021-28955 Arbitrary code execution due to an uncontrolled search path for the git binary
An attacker can execute arbitrary code by placing a malicious git.bat in the current directory, affecting users of the git-bug tool.
- Exploited in the wild
- Not known
- Login needed
- Not needed
- Attackable
- Over the internet
- Victim action needed
- Not needed
- Fix
- Available
What is CVE-2021-28955?
CVE-2021-28955 is a critical path traversal vulnerability in n/a, published on 22 Mar 2021. An attacker can exploit it over the internet without logging in, with no action from the victim.
Official description
git-bug before 0.7.2 has an Uncontrolled Search Path Element. It will execute git.bat from the current directory in certain PATH situations (most often seen on Windows).
Weakness: CWE-427
Which versions are affected by CVE-2021-28955?
2 open source packages ship an affected version, including github.com/MichaelMure/git-bug. It affects 1 product.
| Package | Affected | Fixed in |
|---|---|---|
github.com/MichaelMure/git-bug Go | All versions | 0.7.2 |
github.com/MichaelMure/git-bug Go | All versions | 0.7.2 |
Products include Git-Bug Project Git-Bug.
How do I fix CVE-2021-28955?
Upgrade github.com/MichaelMure/git-bug to 0.7.2 or later.
Upgrade, and resolve every user-supplied path against an allowed base folder before opening it. More about Path traversal.
Is CVE-2021-28955 being exploited?
There is no known exploitation of CVE-2021-28955 in the wild and no public exploit code.
Sources
Also known as GHSA-m898-h4pm-pqfr, openSUSE-SU-2024:12417-1.