{"id":"CVE-2026-48501","aliases":["CVE-2026-48501","GHSA-8xvp-7hj6-mcj9","GO-2026-5271"],"related":[],"kind":"vulnerability","state":"published","title":"GitHub CLI tokens leak via `gh attestation` commands","summary":"GitHub CLI (gh) is GitHub’s official command line tool. Prior to 2.93.0, GitHub CLI incorrectly includes authorization header in API requests to TUF repository mirrors via gh attestation, gh release verify, and gh release verify-asset commands. The CLI uses a shared HTTP client with an authentication layer that automatically attaches tokens to outgoing requests. This layer lacks accurate host detection and can incorrectly attribute the target host, providing it with a token it should never receive. Specifically, the host normalization logic collapses any *.github.com subdomain to github.com, so a request to tuf-repo.github.com (a GitHub Pages site, not a GitHub API endpoint) is treated as a request to github.com and receives the user's github.com token. For hosts that don't match github.com or a known GHES instance at all, the resolver falls back to GH_ENTERPRISE_TOKEN if set. The gh attestation, gh release verify and gh release verify-asset commands fetch data from several external hosts as part of their normal operation (TUF metadata from tuf-repo.github.com and tuf-repo-cdn.sigstore.dev, artifact bundles from Azure Blob Storage). Because these requests go through the same authenticated HTTP client, the token is sent to all of them. This vulnerability is fixed in 2.93.0.","summarySource":"cvelist","descriptions":[{"lang":"en","text":"GitHub CLI (gh) is GitHub’s official command line tool. Prior to 2.93.0, GitHub CLI incorrectly includes authorization header in API requests to TUF repository mirrors via gh attestation, gh release verify, and gh release verify-asset commands. The CLI uses a shared HTTP client with an authentication layer that automatically attaches tokens to outgoing requests. This layer lacks accurate host detection and can incorrectly attribute the target host, providing it with a token it should never receive. Specifically, the host normalization logic collapses any *.github.com subdomain to github.com, so a request to tuf-repo.github.com (a GitHub Pages site, not a GitHub API endpoint) is treated as a request to github.com and receives the user's github.com token. For hosts that don't match github.com or a known GHES instance at all, the resolver falls back to GH_ENTERPRISE_TOKEN if set. The gh attestation, gh release verify and gh release verify-asset commands fetch data from several external hosts as part of their normal operation (TUF metadata from tuf-repo.github.com and tuf-repo-cdn.sigstore.dev, artifact bundles from Azure Blob Storage). Because these requests go through the same authenticated HTTP client, the token is sent to all of them. This vulnerability is fixed in 2.93.0.","source":"cvelist"},{"lang":"en","text":"### Summary\n\nGitHub CLI incorrectly includes an authorization header in API requests to TUF repository mirrors via `gh attestation`, `gh release verify`, and `gh release verify-asset` commands.\n\n **Affected users:**\n\n  - Authenticated `github.com` users who previously ran `gh attestation` commands, `gh release verify`, or `gh release verify-asset`: the `github.com` token was included in requests to `tuf-repo.github.com`, a GitHub Pages domain that is not a GitHub API endpoint. All authentication types are affected.\n  - Users with `GH_ENTERPRISE_TOKEN` or `GITHUB_ENTERPRISE_TOKEN` set who previously ran `gh attestation` commands, `gh release verify`, or `gh release verify-asset`: the enterprise token was included in requests to external hosts `tuf-repo-cdn.sigstore.dev` and `tmaproduction.blob.core.windows.net`. These hosts are not operated by GitHub.\n\n### Details\n\nThe CLI uses a shared HTTP client with an authentication layer that automatically attaches tokens to outgoing requests. This layer lacks accurate host detection and can incorrectly attribute the target host, providing it with a token it should never receive.\n\nSpecifically, the host normalization logic collapses any `*.github.com` subdomain to `github.com`, so a request to `tuf-repo.github.com` (a GitHub Pages site, not a GitHub API endpoint) is treated as a request to `github.com` and receives the user's github.com token. For hosts that don't match `github.com` or a known GHES instance at all, the resolver falls back to `GH_ENTERPRISE_TOKEN` if set.\n\nThe `gh attestation`, `gh release verify` and `gh release verify-asset` commands fetch data from several external hosts as part of their normal operation (TUF metadata from `tuf-repo.github.com` and `tuf-repo-cdn.sigstore.dev`, artifact bundles from Azure Blob Storage). Because these requests go through the same authenticated HTTP client, the token is sent to all of them.\n\n### Impact\n\nTokens were transmitted in HTTP headers to the listed hosts during normal `gh attestation`, `gh release verify`, and `gh release verify-asset` operations. There is no evidence that tokens were logged, retained, or accessed by unauthorized parties. If a token were captured, it would grant the same access as the token holder, potentially including private repositories, organization resources, or enterprise administration depending on token type and permissions.\n\n### Remediation and mitigation\n\n1. Revoke authentication tokens used with the GitHub CLI: \n    - [Personal access tokens](https://docs.github.com/en/enterprise-cloud@latest/authentication/keeping-your-account-and-data-secure/managing-your-personal-access-tokens)\n    - [GitHub CLI OAuth app](https://docs.github.com/en/apps/using-github-apps/reviewing-and-revoking-authorization-of-github-apps#reviewing-your-authorized-github-apps)\n2. Upgrade `gh` to `2.93.0`.\n3. Review personal [security logs](https://docs.github.com/en/authentication/keeping-your-account-and-data-secure/reviewing-your-security-log) and any relevant [audit logs](https://docs.github.com/en/enterprise-cloud@latest/admin/monitoring-activity-in-your-enterprise/reviewing-audit-logs-for-your-enterprise/identifying-audit-log-events-performed-by-an-access-token) for actions associated with personal or enterprise accounts.","format":"markdown","source":"ghsa"},{"lang":"en","text":"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 in github.com/cli/cli","format":"markdown","source":"go"},{"lang":"es","text":"GitHub CLI (gh) es la herramienta oficial de línea de comandos de GitHub. Antes de la versión 2.93.0, GitHub CLI incluye incorrectamente el encabezado de autorización en las solicitudes de API a espejos de repositorio TUF a través de los comandos gh attestation, gh release verify y gh release verify-asset. La CLI utiliza un cliente HTTP compartido con una capa de autenticación que adjunta automáticamente tokens a las solicitudes salientes. Esta capa carece de detección precisa de host y puede atribuir incorrectamente el host de destino, proporcionándole un token que nunca debería recibir. Específicamente, la lógica de normalización de host colapsa cualquier subdominio *.github.com a github.com, por lo que una solicitud a tuf-repo.github.com (un sitio de GitHub Pages, no un punto final de API de GitHub) se trata como una solicitud a github.com y recibe el token github.com del usuario. Para hosts que no coinciden en absoluto con github.com o una instancia GHES conocida, el resolvedor recurre a GH_ENTERPRISE_TOKEN si está configurado. Los comandos gh attestation, gh release verify y gh release verify-asset obtienen datos de varios hosts externos como parte de su operación normal (metadatos TUF de tuf-repo.github.com y tuf-repo-cdn.sigstore.dev, paquetes de artefactos de Azure Blob Storage). Debido a que estas solicitudes pasan por el mismo cliente HTTP autenticado, el token se envía a todos ellos. Esta vulnerabilidad se corrige en la versión 2.93.0.","source":"nvd"}],"published":"2026-05-29T15:14:54.975Z","modified":"2026-07-21T15:10:00.103Z","severity":{"scorer":"GitHub_M","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:H/I:H/A:N","score":7.4,"rating":"HIGH"},"severities":[{"scorer":"GitHub_M","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:H/I:H/A:N","score":7.4,"rating":"HIGH"},{"scorer":"GitHub","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:H/I:H/A:N","score":7.4,"rating":"HIGH"},{"scorer":"NVD","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:N","score":9.1,"rating":"CRITICAL"}],"cwes":["CWE-863"],"affected":[{"ranges":[{"version":"< 2.93.0","status":"affected"}],"vendor":"cli","product":"cli","source":"cvelist"},{"ranges":[{"type":"semver","introduced":"0","status":"affected","fixed":"2.93.0"}],"ecosystem":"Go","package":"github.com/cli/cli/v2","purl":"pkg:golang/github.com/cli/cli/v2","source":"ghsa"},{"ranges":[{"type":"semver","introduced":"0","status":"affected"}],"ecosystem":"Go","package":"github.com/cli/cli","purl":"pkg:golang/github.com/cli/cli","source":"go"},{"ranges":[{"type":"semver","introduced":"0","status":"affected","fixed":"2.93.0"}],"ecosystem":"Go","package":"github.com/cli/cli/v2","purl":"pkg:golang/github.com/cli/cli/v2","source":"go"},{"ranges":[{"status":"affected","fixed":"2.93.0"}],"vendor":"github","product":"cli","cpe":"cpe:2.3:a:github:cli:*:*:*:*:*:*:*:*","source":"nvd"}],"references":[{"url":"https://github.com/cli/cli/security/advisories/GHSA-8xvp-7hj6-mcj9","tags":["advisory","mitigation","vendor-advisory","web","x-refsource-confirm"],"sources":["cvelist","ghsa","go","nvd"]},{"url":"https://nvd.nist.gov/vuln/detail/CVE-2026-48501","tags":["advisory"],"sources":["ghsa","go"]},{"url":"https://github.com/cli/cli","tags":["package"],"sources":["ghsa"]},{"url":"https://github.com/cli/cli/releases/tag/v2.93.0","tags":["web"],"sources":["ghsa","go"]}],"credits":[],"assigner":"GitHub_M","ssvc":{"scorer":"CISA-ADP","exploitation":"none","automatable":"no","technicalImpact":"total","date":"2026-05-29T17:13:29.316Z"},"sources":[{"source":"cvelist","name":"CVE List","id":"CVE-2026-48501","url":"https://www.cve.org/CVERecord?id=CVE-2026-48501","licence":"CVE Terms of Use","modified":"2026-05-29T17:14:30.823Z"},{"source":"ghsa","name":"GitHub Advisory Database","id":"GHSA-8xvp-7hj6-mcj9","url":"https://github.com/advisories/GHSA-8xvp-7hj6-mcj9","licence":"CC-BY-4.0","modified":"2026-06-25T19:56:27.911Z"},{"source":"go","name":"Go Vulnerability Database","id":"GO-2026-5271","url":"https://pkg.go.dev/vuln/GO-2026-5271","licence":"CC-BY-4.0","modified":"2026-06-25T19:45:24.910Z"},{"source":"nvd","name":"NVD","id":"CVE-2026-48501","url":"https://nvd.nist.gov/vuln/detail/CVE-2026-48501","licence":"Public domain","modified":"2026-07-21T15:10:00.103Z"}],"updatedAt":"2026-11-25T22:59:23.334Z","epss":{"score":0.00289,"percentile":0.2309,"date":"2026-12-01T12:00:22.000Z"}}