Arbitrary Code Execution Affecting fish-shell/fish-shell package, versions [3.1.0, 3.4.0)


Severity

Recommended
0.0
high
0
10

CVSS assessment made by Snyk's Security Team. Learn more

Threat Intelligence

EPSS
0.3% (70th percentile)

Do your applications use this vulnerable package?

In a few clicks we can analyze your entire application and see what components are vulnerable in your application, and suggest you quick fixes.

Test your applications

Snyk Learn

Learn about Arbitrary Code Execution vulnerabilities in an interactive lesson.

Start learning
  • Snyk IDSNYK-UNMANAGED-FISHSHELLFISHSHELL-2428350
  • published17 Mar 2022
  • disclosed17 Mar 2022
  • creditJustin Steven

Introduced: 17 Mar 2022

CVE-2022-20001  (opens in a new tab)
CWE-94  (opens in a new tab)

How to fix?

Upgrade fish-shell/fish-shell to version 3.4.0 or higher.

Overview

Affected versions of this package are vulnerable to Arbitrary Code Execution. 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.

Workaround

Remove the fish_git_prompt function from the prompt.

References

CVSS Scores

version 3.1