GHSA-fqfh-778m-2v32: Github.com/cli/cli GitHub CLI Can Execute A Vulnerability
MODERATEGHSA-fqfh-778m-2v32 is a MODERATE github cli can execute a vulnerability (General Security Weakness) affecting Github.com/cli/cli libraries in the Go ecosystem. The issue involves github cli can execute a git binary from the current directory. Remediation is available by upgrading affected packages to version 1.2.1.
GHSA-fqfh-778m-2v32 at a Glance
How to Fix GHSA-fqfh-778m-2v32
To remediate this vulnerability, upgrade all affected Github.com/cli/cli dependencies to a patched release. Both direct and transitive dependencies should be checked, as frameworks or security libraries may pull in vulnerable versions transitively.
Upgrade github.com/cli/cli to 1.2.1
Run the following command in your project directory to verify that all resolved dependencies use the patched release:
inspect dependencies for github.com/cli/cli
How to Check if You Are Affected
To determine whether your application is affected by GHSA-fqfh-778m-2v32, inspect your project dependencies for Github.com/cli/cli:
inspect dependencies for github.com/cli/cli
Analyze the terminal output to locate any version of Github.com/cli/cli in your dependency tree. If any resolved version matches the vulnerable ranges listed in the table below (for example, versions earlier than 1.2.1), your application is affected.
Note: Verify declared build manifests and deployed runtime container environments.
Technical Details
Vulnerability Mechanism & Technical Analysis
This vulnerability is classified under General Security Weakness. In Github.com/cli/cli, software state validation or input boundaries are circumvented during processing. Review the official source advisory statement below for specific affected components, classes, and reproduction details.
Source Advisory Statement
GHSA-fqfh-778m-2v32 Affected Github.com/cli/cli Versions
1 component(s)| Product / Package | Ecosystem | Affected Versions | Fixed Version |
|---|---|---|---|
|
github.com/cli/cli
|
Go |
< 1.2.1
|
1.2.1
|
References
Frequently Asked Questions
What is GHSA-fqfh-778m-2v32?
Which Github.com/cli/cli versions are affected?
What version fixes GHSA-fqfh-778m-2v32?
Is github.com/cli/cli affected?
What CWE is associated with GHSA-fqfh-778m-2v32?
How can I check Go dependencies for GHSA-fqfh-778m-2v32?
Machine-readable OSV JSON
OSV v1.5 Schema
{
"schema_version" : "1.4.0",
"id" : "GHSA-fqfh-778m-2v32",
"modified" : "2021-05-21T22:06:12Z",
"published" : "2022-02-11T23:41:11Z",
"aliases" : [ ],
"summary" : "GitHub CLI can execute a git binary from the current directory",
"details" : "### 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",
"severity" : [ ],
"affected" : [ {
"package" : {
"ecosystem" : "Go",
"name" : "github.com/cli/cli"
},
"ranges" : [ {
"type" : "ECOSYSTEM",
"events" : [ {
"introduced" : "0"
}, {
"fixed" : "1.2.1"
} ]
} ]
} ],
"references" : [ {
"type" : "WEB",
"url" : "https://github.com/cli/cli/security/advisories/GHSA-fqfh-778m-2v32"
} ],
"database_specific" : {
"cwe_ids" : [ ],
"severity" : "MODERATE",
"github_reviewed" : true,
"github_reviewed_at" : "2021-05-21T22:06:12Z",
"nvd_published_at" : null
}
}