CVE-2022-20001
published high CVSS 3.1 · 7.8Injection in fish
Package status and fixes
| Distro / vendor | Release | Package / product | Publisher status | Fixed build | Source |
|---|---|---|---|---|---|
| fish-shell | — | fish-shell>= 3.1.0, < 3.4.0 | Affected | Not stated | GitHub_M |
| Alpine Linux | edge | fish | Fixed | 3.4.0-r0 | Package fix record |
| Debian | bullseye | fish | Advisory build | 3.1.2-3+deb11u1 | DSA-5234-1 |
| SUSE / openSUSE | openSUSE-Leap-15.3 | fish3aarch64 | Advisory build | 3.3.1-bp153.2.10.1 | OPENSUSE-SU-2022:0096-1 |
| Ubuntu | focal | fish | Advisory build | 3.1.0-1.2ubuntu0.1~esm1 | USN-5367-1 |
| Alpine Linux | v3.16 | fish | Fixed | 3.4.0-r0 | Package fix record |
| Alpine Linux | v3.17 | fish | Fixed | 3.4.0-r0 | Package fix record |
| Alpine Linux | v3.18 | fish | Fixed | 3.4.0-r0 | Package fix record |
Show 26 more entries
| Distro / vendor | Release | Package / product | Publisher status | Fixed build | Source |
|---|---|---|---|---|---|
| Alpine Linux | v3.19 | fish | Fixed | 3.4.0-r0 | Package fix record |
| Alpine Linux | v3.20 | fish | Fixed | 3.4.0-r0 | Package fix record |
| Alpine Linux | v3.21 | fish | Fixed | 3.4.0-r0 | Package fix record |
| Alpine Linux | v3.22 | fish | Fixed | 3.4.0-r0 | Package fix record |
| Alpine Linux | v3.23 | fish | Fixed | 3.4.0-r0 | Package fix record |
| Alpine Linux | v3.24 | fish | Fixed | 3.4.0-r0 | Package fix record |
| SUSE / openSUSE | openSUSE-Leap-15.3 | fish3i586 | Advisory build | 3.3.1-bp153.2.10.1 | OPENSUSE-SU-2022:0096-1 |
| SUSE / openSUSE | openSUSE-Leap-15.3 | fish3ppc64le | Advisory build | 3.3.1-bp153.2.10.1 | OPENSUSE-SU-2022:0096-1 |
| SUSE / openSUSE | openSUSE-Leap-15.3 | fish3s390x | Advisory build | 3.3.1-bp153.2.10.1 | OPENSUSE-SU-2022:0096-1 |
| SUSE / openSUSE | openSUSE-Leap-15.3 | fish3x86_64 | Advisory build | 3.3.1-bp153.2.10.1 | OPENSUSE-SU-2022:0096-1 |
| SUSE / openSUSE | openSUSE-Leap-15.3 | fish3-develaarch64 | Advisory build | 3.3.1-bp153.2.10.1 | OPENSUSE-SU-2022:0096-1 |
| SUSE / openSUSE | openSUSE-Leap-15.3 | fish3-develi586 | Advisory build | 3.3.1-bp153.2.10.1 | OPENSUSE-SU-2022:0096-1 |
| SUSE / openSUSE | openSUSE-Leap-15.3 | fish3-develppc64le | Advisory build | 3.3.1-bp153.2.10.1 | OPENSUSE-SU-2022:0096-1 |
| SUSE / openSUSE | openSUSE-Leap-15.3 | fish3-devels390x | Advisory build | 3.3.1-bp153.2.10.1 | OPENSUSE-SU-2022:0096-1 |
| SUSE / openSUSE | openSUSE-Leap-15.3 | fish3-develx86_64 | Advisory build | 3.3.1-bp153.2.10.1 | OPENSUSE-SU-2022:0096-1 |
| SUSE / openSUSE | openSUSE-Tumbleweed | fishaarch64 | Advisory build | 3.4.0-1.1 | OPENSUSE-SU-2024:11936-1 |
| SUSE / openSUSE | openSUSE-Tumbleweed | fishppc64le | Advisory build | 3.4.0-1.1 | OPENSUSE-SU-2024:11936-1 |
| SUSE / openSUSE | openSUSE-Tumbleweed | fishs390x | Advisory build | 3.4.0-1.1 | OPENSUSE-SU-2024:11936-1 |
| SUSE / openSUSE | openSUSE-Tumbleweed | fishx86_64 | Advisory build | 3.4.0-1.1 | OPENSUSE-SU-2024:11936-1 |
| SUSE / openSUSE | openSUSE-Tumbleweed | fish-develaarch64 | Advisory build | 3.4.0-1.1 | OPENSUSE-SU-2024:11936-1 |
| SUSE / openSUSE | openSUSE-Tumbleweed | fish-develppc64le | Advisory build | 3.4.0-1.1 | OPENSUSE-SU-2024:11936-1 |
| SUSE / openSUSE | openSUSE-Tumbleweed | fish-devels390x | Advisory build | 3.4.0-1.1 | OPENSUSE-SU-2024:11936-1 |
| SUSE / openSUSE | openSUSE-Tumbleweed | fish-develx86_64 | Advisory build | 3.4.0-1.1 | OPENSUSE-SU-2024:11936-1 |
| Ubuntu | focal | fish-common | Advisory build | 3.1.0-1.2ubuntu0.1~esm1 | USN-5367-1 |
| Ubuntu | jammy | fish | Advisory build | 3.3.1+ds-3ubuntu0.1~esm1 | USN-5367-1 |
| Ubuntu | jammy | fish-common | Advisory build | 3.3.1+ds-3ubuntu0.1~esm1 | USN-5367-1 |
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.
Related advisories
Vendor advisories explicitly linked to this CVE.
Assessment
CVSS risk assessment and additional context for this vulnerability.
- CVSS version
- 3.1
- Base score
- 7.8 / 10
- Severity
- high
- Provider
- GitHub_M · cna
- Vector string
- CVSS:3.1/AV:L/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:H
Publisher product statements
Version ranges and default statuses as reported by each provider.
| Vendor | Product | Version status | Source |
|---|---|---|---|
| fish-shell | fish-shell | >= 3.1.0, < 3.4.0 (affected) | GitHub_M · cna |
Weaknesses
1- CWE-74 CWE-74: Improper Neutralization of Special Elements in Output Used by a Downstream Component ('Injection')
References
7- 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
- FEDORA-2022-cd2c5e0634 https://lists.fedoraproject.org/archives/list/package-announce%40lists.fedoraproject.org/message/BPZ7JV22DSZB5LNUCUEJ2HO3PKM2TVVK/
- FEDORA-2022-443c5ec2dd https://lists.fedoraproject.org/archives/list/package-announce%40lists.fedoraproject.org/message/TRNMYS2LKB6TKOOBQQRSRQICDMWLZ4QL/
- GLSA-202309-10 https://security.gentoo.org/glsa/202309-10
- DSA-5234 https://www.debian.org/security/2022/dsa-5234
Provider assertions
3GitHub_M · cna
Injection in fish
CISA-ADP · adp
CISA ADP Vulnrichment
CVE · adp
CVE Program Container
Provenance
- Schema
- 5.1
- Searchable
- yes
- Content hash
- 9938ad96a4bd66c98c637c53eb678dd624e1d7f03f43c5007bbc874c1c6b5743
- Ingested
- 23 Sep 2026, 07:57:56 UTC
- Source record
- Official CVE record