{"answers":{"affected":"3 open source packages ship an affected version, including github.com/cli/cli.","exploited":"There is no known exploitation of GHSA-fqfh-778m-2v32 in the wild and no public exploit code.","fix":"Upgrade github.com/cli/cli to 1.2.1 or later.","what":"GHSA-fqfh-778m-2v32 is a command injection vulnerability in github.com/cli/cli, published on 11 Feb 2022. It can only be exploited from the same machine or local network, and only if a user opens a file or follows a link."},"fix_prompt":"Check this codebase for GHSA-fqfh-778m-2v32 and fix it if it is affected.\n\nWhat it is: GHSA-fqfh-778m-2v32 is a command injection vulnerability in github.com/cli/cli, published on 11 Feb 2022. It can only be exploited from the same machine or local network, and only if a user opens a file or follows a link.\nExploitation: There is no known exploitation of GHSA-fqfh-778m-2v32 in the wild and no public exploit code.\n\nAffected packages and fixed versions:\n- github.com/cli/cli (Go): affected all versions; fixed in 1.2.1\n- github.com/cli/cli (Go): affected all versions; fixed in 1.2.1\n- github.com/cli/cli (Go): affected all versions; fixed in 1.2.1\n\nTask:\n1. Search the dependency manifests and lockfiles (for example package.json, package-lock.json, requirements.txt, poetry.lock, uv.lock, pom.xml, build.gradle, go.mod, Cargo.lock, Gemfile.lock) and any Dockerfiles for the affected packages, including transitive dependencies.\n2. If an affected version is in use, upgrade it to the fixed version for its release line with the project's package manager, so the lockfile is regenerated. Prefer the smallest upgrade that fixes it.\n3. If there is no fix, or the upgrade would break the build, do not guess: explain the risk and the safest workaround instead.\n4. Run the tests and summarise what changed and why.\n5. If nothing in the project is affected, say so and change nothing.\n\nReference: https://insights.sbomify.com/GHSA-fqfh-778m-2v32/ (Markdown: https://insights.sbomify.com/GHSA-fqfh-778m-2v32/index.md)","id":"GHSA-fqfh-778m-2v32","markdown":"https://insights.sbomify.com/GHSA-fqfh-778m-2v32/index.md","name":"GHSA-fqfh-778m-2v32","record":{"aliases":["GO-2022-0395"],"analysis":{"component_type":"developer_tool","fix_type":"upgrade","impacts":["code_execution"],"network_reachable":"adjacent_or_local","non_default_config":false,"product_category":"GitHub CLI","requires_auth":"none","summary":"GitHub CLI on Windows executes a malicious git binary from the current directory, allowing code execution when run in untrusted locations.","user_interaction":"required","vuln_class":"command_injection"},"analysis_generated_by":"qwen3.8-flash-next","assigner":null,"cpe":[],"cvss":{"score":null,"severity":null,"source":null,"vector":null,"version":null},"cwes":[],"description":"### Impact\nGitHub 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.\n\nWindows users who run `gh` inside untrusted directories are affected.\n\n### Patches\nUsers should upgrade to GitHub CLI v1.2.1.\n\n### Workarounds\nOther than avoiding untrusted repositories, there is no workaround.\n\n### References\nhttps://github.com/golang/go/issues/38736","ecosystems":["Go"],"exploits":{"exploitdb":null,"first_seen":null,"github_poc":null,"max_poc_stars":null,"metasploit":null,"nuclei":null,"refs":[],"tier":null},"has_fix":true,"headline":"GitHub CLI can execute a git binary from the current directory","id":"GHSA-fqfh-778m-2v32","indexable":true,"kev":null,"kind":"advisory","links":{"ecosystem":"Go","product":null,"products":[],"type":"command_injection","year":"2022"},"n_packages":3,"n_references":null,"packages":[{"ecosystem":"Go","fixed":["1.2.1"],"introduced":["0"],"last_affected":[],"package":"github.com/cli/cli","purl":null,"source":"GHSA-fqfh-778m-2v32"},{"ecosystem":"Go","fixed":["1.2.1"],"introduced":["0"],"last_affected":[],"package":"github.com/cli/cli","purl":"pkg:golang/github.com/cli/cli","source":"GHSA-fqfh-778m-2v32"},{"ecosystem":"Go","fixed":["1.2.1"],"introduced":["0"],"last_affected":[],"package":"github.com/cli/cli","purl":"pkg:golang/github.com/cli/cli","source":"GO-2022-0395"}],"products":null,"published":"2022-02-11","related":[],"sources":[{"class":"attribution","licence":"CC BY 4.0","name":"GitHub Advisory Database","prefix":"GHSA"},{"class":"attribution","licence":"CC BY 4.0","name":"Go Vulnerability Database","prefix":"GO"}],"ssvc":{"automatable":null,"exploitation":null,"technical_impact":null},"state":null,"updated":null,"vendors":null},"summary":"GitHub CLI on Windows executes a malicious git binary from the current directory, allowing code execution when run in untrusted locations.","url":"https://insights.sbomify.com/GHSA-fqfh-778m-2v32/"}