CVE-2022-20001
NixOS vulnerability analysis and mitigation

Overview

CVE-2022-20001 affects the fish shell (versions 3.1.0 through 3.3.1), a command-line shell for macOS, Linux, and other Unix-like systems. The vulnerability was discovered and disclosed in March 2022, where the default configuration of fish could lead to arbitrary code execution when changing into directories containing malicious git repositories (GitHub Advisory).

Technical details

The vulnerability exists in fish's default prompt configuration which automatically runs git commands to display repository information. When a user changes into a directory containing a git repository, the fish_git_prompt function executes git commands without properly restricting repository-specific configurations. These configurations can include arbitrary command execution directives that would be automatically triggered (GitHub Advisory).

Impact

If successfully exploited, an attacker could execute arbitrary commands on the target system if they can convince a user to change into a directory containing a maliciously crafted git repository. This could occur through shared filesystems or by extracting compromised archives. The vulnerability does not affect repositories created through git clone (GitHub Advisory, Gentoo Security).

Mitigation and workarounds

The vulnerability was fixed in fish version 3.4.0. Users should upgrade to this version or later. If upgrading is not immediately possible, users can remove the fish_git_prompt function from their prompt as a temporary workaround (GitHub Advisory, Debian Security).

Additional resources


SourceThis report was generated using AI

Related NixOS vulnerabilities:

CVE ID

Severity

Score

Technologies

Component name

CISA KEV exploit

Has fix

Published date

CVE-2025-69264CRITICAL9.8
  • JavaScriptJavaScript
  • pnpm
NoYesJan 07, 2026
CVE-2025-69263HIGH8.8
  • JavaScriptJavaScript
  • pnpm
NoYesJan 07, 2026
CVE-2025-69262HIGH7.8
  • JavaScriptJavaScript
  • pnpm
NoYesJan 07, 2026
CVE-2025-20807MEDIUM6.7
  • NixOSNixOS
  • android
NoNoJan 06, 2026
CVE-2026-21885MEDIUM6.5
  • NixOSNixOS
  • miniflux
NoYesJan 08, 2026

Free Vulnerability Assessment

Benchmark your Cloud Security Posture

Evaluate your cloud security practices across 9 security domains to benchmark your risk level and identify gaps in your defenses.

Request assessment

Get a personalized demo

Ready to see Wiz in action?

"Best User Experience I have ever seen, provides full visibility to cloud workloads."
David EstlickCISO
"Wiz provides a single pane of glass to see what is going on in our cloud environments."
Adam FletcherChief Security Officer
"We know that if Wiz identifies something as critical, it actually is."
Greg PoniatowskiHead of Threat and Vulnerability Management