Advisory Database
  • Advisories
  • Dependency Scanning
  1. golang
  2. ›
  3. github.com/cli/cli
  4. ›
  5. GMS-2022-19

GMS-2022-19: Improper Neutralization of Special Elements used in an OS Command ('OS Command Injection')

February 11, 2022 (updated January 11, 2023)

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.

References

  • github.com/advisories/GHSA-fqfh-778m-2v32
  • github.com/cli/cli/security/advisories/GHSA-fqfh-778m-2v32

Code Behaviors & Features

Detect and mitigate GMS-2022-19 with GitLab Dependency Scanning

Secure your software supply chain by verifying that all open source dependencies used in your projects contain no disclosed vulnerabilities. Learn more about Dependency Scanning →

Affected versions

All versions before 1.2.1

Fixed versions

  • v1.2.1

Solution

Upgrade to version 1.2.1 or above.

Weakness

  • CWE-78: Improper Neutralization of Special Elements used in an OS Command ('OS Command Injection')

Source file

go/github.com/cli/cli/GMS-2022-19.yml

Spotted a mistake? Edit the file on GitLab.

  • Site Repo
  • About GitLab
  • Terms
  • Privacy Statement
  • Contact

Page generated Wed, 14 May 2025 12:15:13 +0000.