Security mailing lists by PureSourceCode

GHSA-fqfh-778m-2v32

MEDIUM

GitHub CLI can execute a git binary from the current directory

Impact

GitHub CLI depends on a git.exe executable being found in system %PATH% on Windows. However, if 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.

Windows users who run gh inside untrusted directories are affected.

Patches

Users should upgrade to GitHub CLI v1.2.1.

Workarounds

Other than avoiding untrusted repositories, there is no workaround.

References

https://github.com/golang/go/issues/38736

Published
11 Feb 2022
Last modified
3 Mar 2026
Also known as
GO-2022-0395
Sources
OSVJSONOSV GO-2022-0395JSON

Affected

SourceVendor / ecosystemProduct / packageAffected versionsFixed in
OSV Go github.com/cli/cli < 1.2.1 1.2.1

References

History

  • 25 Nov 2026 20:14 UTC · OSV: first stored (published 21 Aug 2024)
  • 25 Nov 2026 20:13 UTC · OSV: first stored (published 11 Feb 2022)
An unhandled error has occurred. Reload ×

Rejoining the server...

Rejoin failed... trying again in seconds.

Failed to rejoin.
Please retry or reload the page.

The session has been paused by the server.

Failed to resume the session.
Please retry or reload the page.