Read the docs
TI-2022-04585 Aliases CVE-2022-20001

Injection in fish

Priority LOW 39CWE-74Published · Updated

Key facts

Attack vector
Local
Privileges required
None
User interaction
Required
Attack complexity
Low
Impact type
Code execution
Confidentiality · integrity · availability
High · High · High
Fix status
Fixed

Attack profile from CVSS 3.1 · CNA. Fix status from CNA. Impact type from CWE-427.

Summary

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.

Why it matters now

Exploitation None reported CISA SSVC · not in CISA KEV
EPSS 0.01484 74th percentileScored 2026-11-07
Fix Fixed fish-shell (fish-shell): 3.4.0

SSVC decision points

CISA ADP · SSVC 2.0.3

Exploitation
None
Automatable
No
Technical impact
Total

The decision (Track, Attend, Act) also depends on your mission and well-being impact; see CISA's SSVC guide.

Affected products

VendorProductAffected versionsFixed inStatusSource
fish-shellfish-shell3.1.0 to before 3.4.03.4.0Patch availableCNA
  • fish-shell Vendorfish-shell Affected 3.1.0 to before 3.4.0 Fixed in 3.4.0 Patch available CNA

CPE configurations NVD · 4

CPEVersionsRoleVendor
cpe:2.3:a:fishshell:fish:*:*:*:*:*:*:*:*3.1.0 – 3.3.1Vulnerablefish-shell
cpe:2.3:o:fedoraproject:fedora:35:*:*:*:*:*:*:*35VulnerableFedoraproject
cpe:2.3:o:fedoraproject:fedora:36:*:*:*:*:*:*:*36VulnerableFedoraproject
cpe:2.3:o:debian:debian_linux:11.0:*:*:*:*:*:*:*11.0VulnerableDebian
  • cpe:2.3:a:fishshell:fish:*:*:*:*:*:*:*:* Versions 3.1.0 – 3.3.1 Vulnerable ·fish-shell
  • cpe:2.3:o:fedoraproject:fedora:35:*:*:*:*:*:*:* Versions 35 Vulnerable ·Fedoraproject
  • cpe:2.3:o:fedoraproject:fedora:36:*:*:*:*:*:*:* Versions 36 Vulnerable ·Fedoraproject
  • cpe:2.3:o:debian:debian_linux:11.0:*:*:*:*:*:*:* Versions 11.0 Vulnerable ·Debian

Remediation

  • Fix · CNA fish-shell (fish-shell) Fixed in 3.4.0

Vendor assessments

Red Hat

Red Hat's page for this CVE →

Not affected: 1 product
  • Red Hat

Timeline

  1. 2026-10-02 Threatist record created from CVE-2022-20001

References

  • TI-2014-02341 fish (aka fish-shell) 2.0.0 before 2.1.1 does not restrict access to the configuration… CVSS 3.1CRITICAL 9.8
  • TI-2014-02578 fish before 2.1.1 allows local users to write to arbitrary files via a symlink attack on… CVSS 3.0HIGH 7.8
  • TI-2014-03133 The funced function in fish (aka fish-shell) 1.23.0 before 2.1.1 does not properly create… CVSS 3.1HIGH 7.0
  • TI-2014-02336 The psub function in fish (aka fish-shell) 1.16.0 before 2.1.1 does not properly create… CVSS 3.1HIGH 7.0
  • TI-2023-26920 Command substitution output can trigger shell expansion in fish shell CVSS 3.1MEDIUM 6.6
  • TI-2014-02335 fish (aka fish-shell) 1.16.0 before 2.1.1 does not properly check the credentials, which… CVSS 2.0MEDIUM 6.9

Sources