# GHSA-fqfh-778m-2v32: GitHub CLI can execute a git binary from the current directory

- Severity: Medium (rating, scored by GitHub)
- Known to be exploited: not in CISA's catalogue, which lists only what CISA has confirmed
- Published: 2022-02-11T23:41:11.000Z
- Modified: 2026-03-03T04:52:10.462Z
- Also known as: GO-2022-0395

## Description

### 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

(As written by GitHub Advisory Database.)

## Affected

- github.com/cli/cli (Go): before 1.2.1

## References

- <https://github.com/cli/cli/security/advisories/GHSA-fqfh-778m-2v32> (advisory, web)

## Sources

- GitHub Advisory Database: [GHSA-fqfh-778m-2v32](https://github.com/advisories/GHSA-fqfh-778m-2v32), CC-BY-4.0, modified 2024-08-21
- Go Vulnerability Database: [GO-2022-0395](https://pkg.go.dev/vuln/GO-2022-0395), CC-BY-4.0, modified 2026-03-03

---

Page: https://cve.day/GHSA-fqfh-778m-2v32 · Whole record: https://cve.day/GHSA-fqfh-778m-2v32.json · Rebuilt by cve.day 2026-11-25T22:56:23.083Z
