CVE-2026-64652: GitHub CLI: Partial token disclosure in `gh auth status` output

Published Aug 6, 2026
·
Updated

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 (githubpat) and GitHub App installation/user access tokens (ghs, ghu, e.g., ghs<APPID><JWT>), including the Actions GITHUBTOKEN. 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 (githubpat) and GitHub App installation/user access tokens (ghs, ghu, e.g., ghs<APPID><JWT>), including the Actions GITHUBTOKEN. 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: - Fine-grained personal access tokens (githubpat): regenerate the token from your account settings. See Managing your personal access tokens. - GitHub App installation/user access tokens (ghs, ghu, e.g., ghs<APPID><JWT>): these are short-lived and rotate automatically (See GitHub credential types). If you believe a token was captured while still valid, you can revoke it immediately using the Revoke an installation access token REST endpoint (DELETE /installation/token). To cut off a third-party app's access more broadly, suspend or uninstall the app from the web UI. See Reviewing and modifying installed GitHub Apps. - Actions GITHUBTOKEN: this token is automatically invalidated when the job finishes, so no manual revocation is normally required. See GitHub credential types. 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.

Other sources

GitHub CLI (gh) is GitHub's official command line tool. Prior to version 2.97.0, gh auth status masked only the characters after the last underscore in certain fine-grained personal access tokens and GitHub App tokens. As a result, part of an affected token could appear in terminal or CI output that is captured or shared. Authenticated users are affected if they 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 (githubpat) and GitHub App installation and user access tokens (ghs, ghu; for example, ghs<APPID><JWT>), as well as the Actions GITHUBTOKEN. Classic tokens such as gho and ghp have an underscore-free body and are not affected. This issue is fixed in version 2.97.0.

— MITRE

GitHub CLI: Partial token disclosure in gh auth status output

— Microsoft

Affected Software

3 affected componentsFixes available
GitHub GitHub CLI (gh)<2.97.0
Microsoft azl3 gh 2.62.0-20<2.97.0-1
2.97.0-1
go/github.com/cli/cli/v2<2.97.0
2.97.0

Remediation

Recommended actions to resolve this vulnerability, in priority order.

  1. Upgrade

    Upgrade to a fixed release to a version that resolves this vulnerability.

    Fixed in 2.97.0-1
  2. Upgrade

    Upgrade go/github.com/cli/cli/v2 to a version that resolves this vulnerability.

    Fixed in 2.97.0
  3. Upgrade

    Upgrade GitHub CLI (gh) to a version that resolves this vulnerability.

    Fixed in 2.97.0
  4. Compensating control

    Until upgrading to 2.97.0, avoid running gh auth status in contexts where its output is captured or shared, and manually redact the token line before sharing output.

  5. Operational

    Rotate any affected fine-grained personal access token (github_pat_*) whose masked gh auth status output may have been captured or shared by regenerating it from account settings. GitHub App installation/user access tokens (ghs_*, ghu_*) rotate automatically, and Actions GITHUB_TOKEN tokens are automatically invalidated when the job finishes.

  6. Operational

    If a token was captured while still valid, revoke the GitHub App installation access token using DELETE /installation/token.

Event History

Aug 6, 2026
CVE Published
via MITRE·05:45 PM
Data Sourced
via MITRE·05:45 PM
DescriptionSeverityWeakness
Data Sourced
via NVD·10:18 PM
DescriptionSeverityWeakness
Aug 11, 2026
Data Sourced
via Microsoft·08:02 AM
DescriptionSeverityWeaknessAffected Software
Oct 15, 2026
Advisory Published
via GitHub·06:05 PM
Data Sourced
via GitHub·06:05 PM
DescriptionSeverityWeaknessAffected Software

Frequently Asked Questions

1

What is the severity of CVE-2026-64652?

The severity of CVE-2026-64652 is rated as low with a score of 3.3.

2

How do I fix CVE-2026-64652?

To fix CVE-2026-64652, update the GitHub CLI to version 2.97.0 or later.

3

What type of vulnerability is CVE-2026-64652?

CVE-2026-64652 is a partial token disclosure vulnerability.

4

In which software is CVE-2026-64652 found?

CVE-2026-64652 is found in the GitHub CLI (gh) tool.

5

What output is affected by CVE-2026-64652?

CVE-2026-64652 affects the output of the `gh auth status` command, which may reveal part of certain tokens.

Contact

SecAlerts Pty Ltd.
132 Wickham Terrace
Fortitude Valley,
QLD 4006, Australia
info@secalerts.co
By using SecAlerts services, you agree to our services end-user license agreement. This website is safeguarded by reCAPTCHA and governed by the Google Privacy Policy and Terms of Service. All names, logos, and brands of products are owned by their respective owners, and any usage of these names, logos, and brands for identification purposes only does not imply endorsement. If you possess any content that requires removal, please get in touch with us.
© 2026 SecAlerts Pty Ltd.
ABN: 70 645 966 203, ACN: 645 966 203