Open-Source Security Intelligence

Know every vulnerability
before it knows you.

DevGuard continuously monitors your dependencies and alerts you when CVEs like this one affect your stack — with real-time threat intelligence built for developers.

Search

GHSA-cg6r-mpgc-h9mm

LowCVSS 3.3 / 10
Published Oct 15, 2026·Last modified Oct 19, 2026
Affected Components(1)
Go logogithub.com/cli/cli/v2
< 2.97.0
Description

Summary

A security vulnerability has been identified in GitHub CLI where gh auth status could potentially print a portion of the authentication token in plaintext, depending on the lexical structure of the token.

Affected users:

  • Authenticated users who ran gh auth status (without the --show-token flag) with a token type whose format contains an underscore after the prefix. This includes fine-grained personal access tokens (github_pat_*) and GitHub App installation/user access tokens (ghs_*, ghu_*, e.g., ghs_<APPID>_<JWT>), including the Actions GITHUB_TOKEN. Classic tokens such as gho_* and ghp_* have an underscore-free body and are not affected.

Details

The vulnerability stems from the way GitHub CLI masks the authentication token when reporting authentication state:

  1. A user runs gh auth status without --show-token, expecting the token to be fully masked.
  2. The masking logic redacts only the characters that follow the last underscore in the token, instead of redacting everything after the token prefix.
  3. The partially masked token is written to the command output, where it can be captured or shared.

Because gh auth status is a diagnostic command commonly run interactively and inside automated environments, the leaked token characters can end up in CI/CD job logs, terminal scrollback, screen recordings, screenshots, or pasted output shared in bug reports and support requests.

In v2.97.0, GitHub CLI fully masks the token in gh auth status output, preserving only the known token prefix and redacting the remainder unless --show-token is explicitly provided.

Impact

Running gh auth status in a context where the output is captured, logged, or shared could leak a portion of an affected token. The affected token types are fine-grained personal access tokens (github_pat_*) and GitHub App installation/user access tokens (ghs_*, ghu_*, e.g., ghs_<APPID>_<JWT>), including the Actions GITHUB_TOKEN. Installation and Actions tokens are short-lived, which narrows the window in which a recovered token could be reused. See GitHub credential types.

Remediation and Mitigation

  1. Upgrade gh to v2.97.0.
  2. Rotate any affected token whose masked gh auth status output may have been captured or shared:
  3. Until you can upgrade, avoid running gh auth status in contexts where the output is captured or shared, and manually redact the token line before sharing any output.
Upload your SBOM

Upload your own SBOM in CycloneDX 1.6 or higher (JSON) directly here to check your vulnerabilities.

Risk Scores
Base Score
3.3

The vulnerability requires local access to the device to be exploited. It is easy for an attacker to exploit this vulnerability. An attacker needs basic access or low-level privileges. No user interaction is needed for the attacker to exploit this vulnerability. The impact is confined to the system where the vulnerability exists. There is a low impact on the confidentiality of the information.

Threat Intelligence
3.1

Limited exploitation activity has been observed. Close monitoring and planned remediation are recommended.

EPSS
0.15%

The exploit probability is very low. The vulnerability is unlikely to be exploited in the next 30 days.

Exploit
Not available

We did not find any exploit available. Neither in GitHub repositories nor in the Exploit-Database.

Browse More

Scan your project

Continuously monitor your dependencies and get alerted when vulnerabilities like this one affect your stack.

Checkout DevGuard