cve.bz

CVE-2022-20001 Uncontrolled Search Path Element

7.8 highEPSS 1.5%Fix available

High (7.8). EPSS 1.5% estimated probability of exploitation activity in the next 30 days.

On this page
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.

Severity

CVSS 3.1

7.8 high
CVSS:3.1/AV:L/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:H
EPSS
1.5% (unchanged from 1.5% a week ago; 1.5% 30 days ago) estimated probability of exploitation activity in the next 30 days; 75th percentile. Scored 2026-11-22. A forecast for this CVE across the internet, not for your own systems.
CISA's assessment (SSVC)
Exploitation: none · Automatable: no · Technical impact: total, assessed 2025-04-23. From CISA's Vulnrichment in the CVE List: whether it is exploited, whether exploiting it can be automated, and how much control it gives.
CWEs
CWE-427 Uncontrolled Search Path Element
CWE-74 Improper Neutralization of Special Elements in Output Used by a Downstream Component (Injection)
OWASP Top 10
A05:2025 Injection, A08:2025 Software or Data Integrity Failures
Published
Modified
NVD analysis
Analyzed, since modified
Record from
the NVD, synced

Fix and patched versions

Ask an AI about this CVE

Show the promptExplain CVE-2022-20001 for an engineer deciding whether to act. Use https://cve.bz/api/public/cves/CVE-2022-20001?via=ask-ai-copy and https://cve.bz/cve/CVE-2022-20001?via=ask-ai-copy as the source of truth: what is affected and which versions fix it, whether it is in CISA KEV, public exploits, and its EPSS (an internet-wide 30-day estimate of exploitation activity, not a forecast for my systems). If they give no fixed versions, use the CVE record https://cveawg.mitre.org/api/cve/CVE-2022-20001 or the vendor advisory, not third-party mirrors. Tell me how to check whether I am affected and how to verify a fix. Cite the sources and say where they are uncertain.

Opens a third-party assistant; its answer is its own, not cve.bz's. The prompt holds only this CVE's id and public links.

Affected

Versions

From the NVD's CPE matches.

ProductAffected
fishshell:fishfrom 3.1.0 through 3.3.1
fedoraproject:fedora35
fedoraproject:fedora36
debian:debian_linux11.0

Linux distributions

DistributionReleasePackageFixed inAdvisory
Debian11fish3.1.2-3+deb11u1DSA-5234-1
Debian12, 13, 14fish3.4.0+ds-1DEBIAN-CVE-2022-20001
UbuntuPro:20.04:LTSfish3.1.0-1.2ubuntu0.1~esm1UBUNTU-CVE-2022-20001 USN-5367-1
UbuntuPro:22.04:LTSfish3.3.1+ds-3ubuntu0.1~esm1UBUNTU-CVE-2022-20001 USN-5367-1
SUSEPackage Hub 15 SP3fish33.3.1-bp153.2.10.1openSUSE-SU-2022:0096-1
openSUSELeap 15.3fish33.3.1-bp153.2.10.1openSUSE-SU-2022:0096-1
Alpinev3.16, v3.17, v3.18 and 6 morefish3.4.0-r0ALPINE-CVE-2022-20001

From the distributions' data via OSV.dev: the Debian Security Tracker; Ubuntu Security Notices © Canonical Ltd., CC BY-SA 4.0; SUSE security data, CC BY 4.0; the Alpine secdb, CC BY-SA 4.0. Modified: reformatted and linked to CVE records. Credits. On the distributions' own pages: Debian · Ubuntu · SUSE · openSUSE · Alpine.

Attack patterns (CAPEC)

  • CAPEC-38 Leveraging/Manipulating Configuration File Search Paths Likelihood: High · Severity: Very High
  • CAPEC-471 Search Order Hijacking Severity: Medium

The attack patterns MITRE's CAPEC relates to this record's weaknesses, as MITRE names them. Credits. More on the page of CWE-74 (37).

References

Check your stackJSON