CVE catalog

CVE-2022-20001

fish: CVE-2022-20001

[CVE catalog]

Severity
High · CVSS 7.3CVSS:3.1/AV:L/AC:L/PR:L/UI:R/S:U/C:H/I:H/A:H
Published
Source
[NVD] · [CVE record]
EPSS
1.48% · Oct 25, 2026

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.

Vulnerable and fixed packages

Distribution-reported package versions and fixes. These do not depend on matching against the OpenFactory package catalog.

DistributionPackageReleaseVersionStatus
Debianfishsid4.9.3-1fixed
Debianfishforky4.9.3-1fixed
Debianfishtrixie4.0.2-1fixed
Debianfishbookworm3.6.0-3.1+deb12u1fixed
Ubuntufishpro3.1.2-3ubuntu1vulnerable
Ubuntufishpro3.3.1+ds-2vulnerable
Ubuntufishpro3.3.1+ds-3vulnerable
Ubuntufishpro3.3.1+ds-3ubuntu0.1~esm1fixed
Ubuntufishpro3.1.2-3ubuntu1vulnerable
Ubuntufishpro3.3.1+ds-2vulnerable
Ubuntufishpro3.3.1+ds-3vulnerable
Ubuntufishpro3.3.1+ds-3ubuntu0.1~esm1fixed
Susefish3package hub 15 sp33.3.1-bp153.2.10.1fixed
Opensusefish3leap 15.33.3.1-bp153.2.10.1fixed

Fixed-version evidence

DistributionPackageTypeReleaseFixed versionUrgencyOriginBugs
Debianfishsourcesid3.4.0+ds-1not yet assignedNot reportedNot reported
Debianfishsourceforky3.4.0+ds-1not yet assignedNot reportedNot reported
Debianfishsourcetrixie3.4.0+ds-1not yet assignedNot reportedNot reported
Debianfishsourcebookworm3.4.0+ds-1not yet assignedNot reportedNot reported
Ubuntufishdebpro3.3.1+ds-3ubuntu0.1~esm1Not reportedUSN-5367-1Not reported
Ubuntufishdebpro3.3.1+ds-3ubuntu0.1~esm1Not reportedUBUNTU-CVE-2022-20001Not reported
Susefish3rpmpackage hub 15 sp33.3.1-bp153.2.10.1Not reportedOPENSUSE-SU-2022:0096-1Not reported
Opensusefish3rpmleap 15.33.3.1-bp153.2.10.1Not reportedOPENSUSE-SU-2022:0096-1Not reported

OpenFactory catalog packages

[Debian 12 (Bookworm)]

  • [fish]Fixed
    Details (2)
    • 3.6.0-3.1+deb12u1 · amd64 · bookworm

      Fixed · Fixed: 3.4.0+ds-1

      dsa · fish · debian · bookworm

    • 3.6.0-3.1+deb12u1 · arm64 · bookworm

      Fixed · Fixed: 3.4.0+ds-1

      dsa · fish · debian · bookworm

  • Source package: [fish]

    Details (2)
    • 3.6.0-3.1+deb12u1 · all · bookworm

      Fixed · Fixed: 3.4.0+ds-1

      dsa · fish · debian · bookworm

    • 3.6.0-3.1+deb12u1 · all · bookworm

      Fixed · Fixed: 3.4.0+ds-1

      dsa · fish · debian · bookworm

Observed:

References