GHSA-fqfh-778m-2v32 json
GitHub CLI can execute a git binary from the current directory
published 4y ago modified 8mo ago also GO-2022-0395
- cvss
- —
- not scored
- cisa kev
- Not listed
- not in CISA's catalog
- epss
- —
- no score, EPSS covers CVEs only
- public exploits
- 0
- none known
Summary
### 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
Patch / fix
- go github.com/cli/cli 1.2.1
Is GHSA-fqfh-778m-2v32 in your dependencies? Fencer shows which of your repositories are affected as soon as an advisory lands, and opens the fix as a pull request.
Check with FencerAffected packages
| ecosystem | package | affected | fixed in |
|---|---|---|---|
| go | github.com/cli/cli | <1.2.1 |
1.2.1 |
References
Sources
- GitHub Advisory GHSA-fqfh-778m-2v32
- OSV GO-2022-0395
Fencer Intel keeps one entry per vulnerability: the CVE id wins, then GHSA, and records that alias each other are merged, except that two CVEs always keep separate entries. The same data is available as JSON.