Arbitrary Code Execution Affecting github.com/cli/cli/pkg/cmd/repo/fork package, versions <1.2.1


Severity

Recommended
0.0
high
0
10

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

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 IDSNYK-GOLANG-GITHUBCOMCLICLIPKGCMDREPOFORK-7895543
  • published4 Sept 2024
  • disclosed11 Feb 2022
  • creditDawid Golunski

Introduced: 11 Feb 2022

CVE NOT AVAILABLE CWE-94  (opens in a new tab)

How to fix?

Upgrade github.com/cli/cli/pkg/cmd/repo/fork to version 1.2.1 or higher.

Overview

Affected versions of this package are vulnerable to Arbitrary Code Execution. GitHub CLI depends on a git.exe executable being found in the system %PATH% on Windows. When a malicious .\git.exe or .\git.bat is found in the current working directory at the time of running gh, the malicious command will be invoked instead of the system one.

Note: Windows users who run gh inside untrusted directories are affected.

CVSS Scores

version 3.1