CVE-2026-64652: GitHub CLI partially discloses authentication tokens in `gh auth status` output
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.
Published Oct 15, 2026
Affected packages
github.com/cli/cli/v2
- Ecosystem
- Go
- Affected
- < 2.97.0
- Fixed in
- 2.97.0
- Check
go list -m github.com/cli/cli/v2
Advisory details
From the GitHub Advisory Database (CC BY 4.0).
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-tokenflag) 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 ActionsGITHUB_TOKEN. Classic tokens such asgho_*andghp_*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:
- A user runs
gh auth statuswithout--show-token, expecting the token to be fully masked. - The masking logic redacts only the characters that follow the last underscore in the token, instead of redacting everything after the token prefix.
- 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
- Upgrade
ghtov2.97.0. - Rotate any affected token whose masked
gh auth statusoutput may have been captured or shared: - **Fine-grained personal access tokens (
github_pat_*):** 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 `GITHUB_TOKEN`: this token is automatically invalidated when the job finishes, so no manual revocation is normally required. See GitHub credential types.
- Until you can upgrade, avoid running
gh auth statusin contexts where the output is captured or shared, and manually redact the token line before sharing any output.
Credited to babakks, BagToad, weshaggard, shelbyc.
References
How this page is made: the data panel comes from the GitHub Advisory Database, CISA’s KEV catalog, the NVD and FIRST EPSS, and updates twice a day. No analysis has been written for this entry yet. Methodology
More Go vulnerabilities
All Go entriesCVE-2026-64653
GitHub CLI allows path traversal through unescaped request URL components
low2.1Oct 15, 2026CVE-2026-64655
GitHub CLI allows attestation verification bypass through unescaped regex metacharacters
low2.1Oct 15, 2026CVE-2026-48501
GitHub CLI has an incorrect authorization header in API requests to TUF repository mirrors via `gh attestation`, `gh release verify`, and `gh release verify-asset` commands
high7.4May 29, 2026CVE-2026-45803
GitHub CLI: GitHub Actions log output in `gh run view` allows terminal escape sequence injection
low3.5No fixMay 19, 2026CVE-2025-25204
`gh attestation verify` returns incorrect exit code during verification if no attestations are present
medium6.3Feb 14, 2025CVE-2024-54132
Downloading malicious GitHub Actions workflow artifact results in path traversal vulnerability
medium6.3No fixDec 4, 2024
