CVE-2022-20001
CVE-2022-20001 is a high-severity vulnerability in Fishshell Fish with a CVSS 3.x base score of 7.8. It is not currently listed as actively exploited by CISA, and its EPSS exploit-prediction score is low. The underlying weakness is classified as CWE-427.
Key facts
- Severity: High (CVSS 3.x base score 7.8)
- CVSS v2: 6.8
- EPSS exploit prediction: 1% (70th percentile)
- Actively exploited: Not listed in CISA KEV
- Weakness: CWE-427
- Affected product: Fishshell Fish
- Published:
- Last modified:
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.
Frequently asked questions
- What is CVE-2022-20001?
- 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.
- How severe is CVE-2022-20001?
- CVE-2022-20001 has a CVSS 3.x base score of 7.8, rated high severity. It is exploitable over local access with low attack complexity, requires no privileges and user interaction. Impact on confidentiality is high, integrity high, and availability high.
- Is CVE-2022-20001 being actively exploited?
- It is not currently listed in CISA's KEV catalog. Its EPSS exploit-prediction score is 1% (70th percentile), an estimate of the probability of exploitation in the next 30 days.
- What products are affected by CVE-2022-20001?
- CVE-2022-20001 primarily affects Fishshell Fish. In total, 4 product configurations (CPEs) are listed as vulnerable; see the affected-products list for the exact versions.
- How do I fix CVE-2022-20001?
- Review the linked vendor and NVD advisories for patched versions and mitigations, then upgrade or apply the recommended workaround. Given its high severity, prioritise patching exposed systems.
- When was CVE-2022-20001 published?
- CVE-2022-20001 was published on 2022-03-14 and last updated on 2026-06-17.
References
- https://github.com/fish-shell/fish-shell/pull/8589
- https://github.com/fish-shell/fish-shell/releases/tag/3.4.0
- https://github.com/fish-shell/fish-shell/security/advisories/GHSA-pj5f-6vxj-f5mq
- https://lists.fedoraproject.org/archives/list/package-announce%40lists.fedoraproject.org/message/BPZ7JV22DSZB5LNUCUEJ2HO3PKM2TVVK/
- https://lists.fedoraproject.org/archives/list/package-announce%40lists.fedoraproject.org/message/TRNMYS2LKB6TKOOBQQRSRQICDMWLZ4QL/
- https://security.gentoo.org/glsa/202309-10
- https://www.debian.org/security/2022/dsa-5234
Affected products (4)
- cpe:2.3:a:fishshell:fish:*:*:*:*:*:*:*:*
- cpe:2.3:o:fedoraproject:fedora:35:*:*:*:*:*:*:*
- cpe:2.3:o:fedoraproject:fedora:36:*:*:*:*:*:*:*
- cpe:2.3:o:debian:debian_linux:11.0:*:*:*:*:*:*:*
More vulnerabilities in Fishshell Fish
- CVE-2014-2914 — Critical (CVSS 9.8): fish (aka fish-shell) 2.0.0 before 2.1.1 does not restrict access to the configuration service (aka fish_config), which…
- CVE-2014-3219 — High (CVSS 7.8): fish before 2.1.1 allows local users to write to arbitrary files via a symlink attack on (1) /tmp/fishd.log.%s, (2)…
- CVE-2014-3856 — High (CVSS 7.0): The funced function in fish (aka fish-shell) 1.23.0 before 2.1.1 does not properly create temporary files, which allows…
- CVE-2014-2906 — High (CVSS 7.0): The psub function in fish (aka fish-shell) 1.16.0 before 2.1.1 does not properly create temporary files, which allows…
- CVE-2014-2905 — Medium (CVSS 6.9): fish (aka fish-shell) 1.16.0 before 2.1.1 does not properly check the credentials, which allows local users to gain…
- CVE-2023-49284 — Low (CVSS 3.9): fish is a smart and user-friendly command line shell for macOS, Linux, and the rest of the family. fish shell uses…
All CVEs affecting Fishshell Fish →
Other CWE-427 (Uncontrolled Search Path Element) vulnerabilities
- CVE-2025-4981 — Critical (CVSS 9.9): Mattermost versions 10.5.x <= 10.5.5, 9.11.x <= 9.11.15, 10.8.x <= 10.8.0, 10.7.x <= 10.7.2, 10.6.x <= 10.6.5 fail to…
- CVE-2025-69599 — Critical (CVSS 9.8): RayVentory Scan Engine through 12.6 Update 8 allows attackers to gain privileges if they control the value of the PATH…
- CVE-2019-25268 — Critical (CVSS 9.8): NREL BEopt 2.8.0.0 contains a DLL hijacking vulnerability that allows attackers to load arbitrary libraries by tricking…
- CVE-2023-53959 — Critical (CVSS 9.8): FileZilla Client 3.63.1 contains a DLL hijacking vulnerability that allows attackers to execute malicious code by…
- CVE-2025-65741 — Critical (CVSS 9.8): Sublime Text 3 Build 3208 or prior for MacOS is vulnerable to Dylib Injection. An attacker could compile a .dylib file…
- CVE-2024-23054 — Critical (CVSS 9.8): An issue in Plone Docker Official Image 5.2.13 (5221) open-source software that could allow for remote code execution…
Browse all CWE-427 (Uncontrolled Search Path Element) vulnerabilities →