CVE-2021-36753 Uncontrolled Search Path Element in sharkdp/bat
Attackers can execute arbitrary code by placing a malicious less.exe in the current working directory when using BAT.
- Exploited in the wild
- Not known
- Login needed
- Any signed-in user
- Attackable
- Local or same network only
- Victim action needed
- Not needed
- Fix
- Available
What is CVE-2021-36753?
CVE-2021-36753 is a high-severity path traversal vulnerability in n/a, published on 15 Jul 2021. It can only be exploited from the same machine or local network, with no action from the victim.
Official description
sharkdp BAT before 0.18.2 executes less.exe from the current working directory.
Weakness: CWE-427
Which versions are affected by CVE-2021-36753?
3 open source packages ship an affected version, including bat. It affects 1 product.
| Package | Affected | Fixed in |
|---|---|---|
bat crates.io | All versions | 0.18.2 |
bat crates.io | All versions | 0.18.2 |
bat crates.io | From 0.0.0-0 | 0.18.2 |
Products include Bat Project Bat.
How do I fix CVE-2021-36753?
Upgrade bat to 0.18.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-36753 being exploited?
There is no known exploitation of CVE-2021-36753 in the wild and no public exploit code.
Sources
Also known as GHSA-p24j-h477-76q3, RUSTSEC-2021-0106.