CVE-2022-20001 Injection in fish
Attackers can execute arbitrary code by tricking users into navigating to malicious directories, triggering unsafe git commands in the fish shell prompt.
- Exploited in the wild
- Not known
- Login needed
- Not needed
- Attackable
- Local or same network only
- Victim action needed
- A user has to click or open something
- Fix
- Available
What is CVE-2022-20001?
CVE-2022-20001 is a high-severity command injection vulnerability in Debian Debian Linux, published on 14 Mar 2022. It can only be exploited from the same machine or local network, and only if a user opens a file or follows a link.
Official description
fish is a command line shell. fish version 3.1.0 through version 3.3.1 is vulnerable to arbitrary code execution. git repositories can contain per-repository configuration that change the behavior of git, including running arbitrary commands. When using the default configuration of fish, changing to a directory automatically runs `git` commands in order to display information about the current repository in the prompt. If an attacker can convince a user to change their current directory into one controlled by the attacker, such as on a shared file system or extracted archive, fish will run arbitrary commands under the attacker's control. This problem has been fixed in fish 3.4.0. Note that running git in these directories, including using the git tab completion, remains a potential trigger for this issue. As a workaround, remove the `fish_git_prompt` function from the prompt.
Which versions are affected by CVE-2022-20001?
It affects 3 products.
Linux distribution packages (2)
fish3 SUSE:Package Hub 15 SP3 | All versions | 3.3.1-bp153.2.10.1 |
fish3 openSUSE:Leap 15.3 | All versions | 3.3.1-bp153.2.10.1 |
Products include Debian Debian Linux, Fedoraproject Fedora, Fishshell Fish.
How do I fix CVE-2022-20001?
Upgrade to a fixed version.
Upgrade, and pass arguments to programs as a list instead of through a shell. More about Command injection.
Is CVE-2022-20001 being exploited?
There is no known exploitation of CVE-2022-20001 in the wild and no public exploit code.
Other vulnerabilities in Debian Debian Linux
Sources
Also known as ALPINE-CVE-2022-20001, DEBIAN-CVE-2022-20001, DSA-5234-1, GHSA-pj5f-6vxj-f5mq, MGASA-2022-0181, OESA-2022-1689 and 4 more.