VDB

CVE-2022-20001

CVE-2022-20001 PUBLISHED CVSS 7.8 HIGH

Injection in fish

Reported by github_m · Published March 14, 2022

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.

Risk scores

CVSS 3.1
7.8
CVSS:3.1/AV:L/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:H

Affected products

VendorProductVersions
fish-shellfish-shell>= 3.1.0, < 3.4.0
fish-shellfish-shell3.1.0
alpinefish0

Timeline

  • Mar 14, 2022 CVE Published
  • Mar 15, 2022 EPSS Score (30 in total, the first dated here)
  • Apr 23, 2025 CVE Updated
  • Mar 10, 2026 Distribution Patch
  • Mar 10, 2026 Security Advisory (3 in total, the first dated here)
  • Jul 10, 2026 Coalition ESS Score

Query this with the API

The same record, from the CLI:

vulnetix vdb vuln CVE-2022-20001
vulnetix vdb fixes CVE-2022-20001

Or with curl, using the org id and key from your account page:

curl -s -H "Authorization: ApiKey ${VULNETIX_ORG_ID}:${VULNETIX_API_KEY}" \
  "https://api.vdb.vulnetix.com/v2/vuln/CVE-2022-20001/fixes/registry"

The Community plan is free and allows 50 queries a day. Get a free API key · API quickstart

References

Look up in the Resolve Platform →
$ Lookup Community · 50/day Open Lookup ›