GHSA-CG6R-MPGC-H9MM
Vulnerability from github – Published: 2026-10-15 18:05 – Updated: 2026-10-15 18:05Summary
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:
- 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.
{
"affected": [
{
"package": {
"ecosystem": "Go",
"name": "github.com/cli/cli/v2"
},
"ranges": [
{
"events": [
{
"introduced": "0"
},
{
"fixed": "2.97.0"
}
],
"type": "ECOSYSTEM"
}
]
}
],
"aliases": [
"CVE-2026-64652"
],
"database_specific": {
"cwe_ids": [
"CWE-201"
],
"github_reviewed": true,
"github_reviewed_at": "2026-10-15T18:05:19Z",
"nvd_published_at": "2026-08-06T22:18:13Z",
"severity": "LOW"
},
"details": "### Summary\n\nA 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.\n\nAffected users:\n- 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_\u003cAPPID\u003e_\u003cJWT\u003e`), including the Actions `GITHUB_TOKEN`. Classic tokens such as `gho_*` and `ghp_*` have an underscore-free body and are not affected.\n\n### Details\n\nThe vulnerability stems from the way GitHub CLI masks the authentication token when reporting authentication state:\n\n1. A user runs `gh auth status` without `--show-token`, expecting the token to be fully masked.\n2. The masking logic redacts only the characters that follow the last underscore in the token, instead of redacting everything after the token prefix.\n3. The partially masked token is written to the command output, where it can be captured or shared.\n\nBecause `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.\n\nIn `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.\n\n### Impact\n\nRunning `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_\u003cAPPID\u003e_\u003cJWT\u003e`), 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](https://docs.github.com/en/organizations/managing-programmatic-access-to-your-organization/github-credential-types#credential-types-overview).\n\n### Remediation and Mitigation\n\n1. Upgrade `gh` to `v2.97.0`.\n2. Rotate any affected token whose masked `gh auth status` output may have been captured or shared:\n - **Fine-grained personal access tokens (`github_pat_*`):** regenerate the token from your account settings. See [Managing your personal access tokens](https://docs.github.com/en/authentication/keeping-your-account-and-data-secure/managing-your-personal-access-tokens).\n - **GitHub App installation/user access tokens (`ghs_*`, `ghu_*`, e.g., `ghs_\u003cAPPID\u003e_\u003cJWT\u003e`):** these are short-lived and rotate automatically (See [GitHub credential types](https://docs.github.com/en/organizations/managing-programmatic-access-to-your-organization/github-credential-types#credential-types-overview)). If you believe a token was captured while still valid, you can revoke it immediately using the [Revoke an installation access token](https://docs.github.com/en/rest/apps/installations#revoke-an-installation-access-token) REST endpoint (`DELETE /installation/token`). To cut off a third-party app\u0027s access more broadly, suspend or uninstall the app from the web UI. See [Reviewing and modifying installed GitHub Apps](https://docs.github.com/en/apps/using-github-apps/reviewing-and-modifying-installed-github-apps).\n - **Actions `GITHUB_TOKEN`:** this token is automatically invalidated when the job finishes, so no manual revocation is normally required. See [GitHub credential types](https://docs.github.com/en/organizations/managing-programmatic-access-to-your-organization/github-credential-types#credential-types-overview).\n3. 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.",
"id": "GHSA-cg6r-mpgc-h9mm",
"modified": "2026-10-15T18:05:20Z",
"published": "2026-10-15T18:05:19Z",
"references": [
{
"type": "WEB",
"url": "https://github.com/cli/cli/security/advisories/GHSA-cg6r-mpgc-h9mm"
},
{
"type": "ADVISORY",
"url": "https://nvd.nist.gov/vuln/detail/CVE-2026-64652"
},
{
"type": "WEB",
"url": "https://github.com/cli/cli/commit/3f6a16a9f8c7fe9676aa8d8f47b399310dd231c3"
},
{
"type": "PACKAGE",
"url": "https://github.com/cli/cli"
},
{
"type": "WEB",
"url": "https://github.com/cli/cli/releases/tag/v2.97.0"
}
],
"schema_version": "1.4.0",
"severity": [
{
"score": "CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:L/I:N/A:N",
"type": "CVSS_V3"
}
],
"summary": "GitHub CLI partially discloses authentication tokens in `gh auth status` output"
}
Drag nodes to arrange them. Double-click a related vulnerability to open it, or a source to visit its link. The Physics button on the left tunes the layout and the simulation; the legend at the bottom left hides or shows nodes by kind and by sighting type.
Sightings
| Author | Source | Type | Date | Other |
|---|
Nomenclature
- Seen: The vulnerability was mentioned, discussed, or observed by the user.
- Confirmed: The vulnerability has been validated from an analyst's perspective.
- Published Proof of Concept: A public proof of concept is available for this vulnerability.
- Exploited: The vulnerability was observed as exploited by the user who reported the sighting.
- Patched: The vulnerability was observed as successfully patched by the user who reported the sighting.
- Not exploited: The vulnerability was not observed as exploited by the user who reported the sighting.
- Not confirmed: The user expressed doubt about the validity of the vulnerability.
- Not patched: The vulnerability was not observed as successfully patched by the user who reported the sighting.
Vulnerability timeline
Sightings and recorded dates, grouped by day · UTC
Loading timeline…
The approach is described in our paper Mapping CVEs to MITRE ATT&CK Techniques: A Curated Gold-Set Classifier and the Limits of LLM-Assisted Label Expansion.
Browse all ATT&CK techniques and the vulnerabilities related to each.
Related by attack behaviour
Vulnerabilities whose description is nearest to this one in the vector space of the CIRCL/vulnerability-attack-technique-biencoder model. This is a similarity search over the bi-encoder space (plain cosine), not a classification, and it has no measured accuracy.