# CVE-2026-48501: GitHub CLI tokens leak via `gh attestation` commands

> GitHub CLI leaks user authentication tokens to external TUF mirrors and storage hosts due to flawed host detection in attestation commands.

- **Severity:** High 7.4 (`CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:H/I:H/A:N`)
- **Exploited in the wild:** Not known
- **Login needed:** Not needed
- **Attackable:** Over the internet
- **Victim action needed:** Not needed
- **Fix available:** Yes
- **Published:** 29 May 2026
- **Updated:** 29 May 2026
- **Also known as:** DEBIAN-CVE-2026-48501, GHSA-8xvp-7hj6-mcj9, GO-2026-5271

## What is CVE-2026-48501?

CVE-2026-48501 is a high-severity vulnerability in cli, published on 29 May 2026. An attacker can exploit it over the internet without logging in, with no action from the victim.

### Official description

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.

Weakness: CWE-863 (Incorrect Authorization)

## Which versions are affected by CVE-2026-48501?

4 open source packages ship an affected version, including github.com/cli/cli/v2 and github.com/cli/cli. It affects 1 product.


| Package | Ecosystem | Affected | Fixed in |
| --- | --- | --- | --- |
| `github.com/cli/cli/v2` | Go | All versions | 2.93.0 |
| `github.com/cli/cli/v2` | Go | All versions | 2.93.0 |
| `github.com/cli/cli/v2` | Go | All versions | 2.93.0 |
| `github.com/cli/cli` | Go | All versions | None |

Products: Github Cli.

## How do I fix CVE-2026-48501?

Upgrade github.com/cli/cli/v2 to 2.93.0 or later.

## Is CVE-2026-48501 being exploited?

There is no known exploitation of CVE-2026-48501 in the wild and no public exploit code.

## Other vulnerabilities in cli

- [CVE-2024-52308](https://insights.sbomify.com/CVE-2024-52308/): Connecting to a malicious Codespaces via GH CLI could allow command execution on the user's computer (high 8.0)
- [CVE-2026-45803](https://insights.sbomify.com/CVE-2026-45803/): gh: GitHub Actions log output in `gh run view` allows terminal escape sequence injection (low 3.5)

## Fix prompt for AI coding agents

```text
Check this codebase for CVE-2026-48501 and fix it if it is affected.

What it is: CVE-2026-48501 is a high-severity vulnerability in cli, published on 29 May 2026. An attacker can exploit it over the internet without logging in, with no action from the victim.
Exploitation: There is no known exploitation of CVE-2026-48501 in the wild and no public exploit code.

Affected packages and fixed versions:
- github.com/cli/cli/v2 (Go): affected all versions; fixed in 2.93.0
- github.com/cli/cli/v2 (Go): affected all versions; fixed in 2.93.0
- github.com/cli/cli/v2 (Go): affected all versions; fixed in 2.93.0
- github.com/cli/cli (Go): affected all versions; no fix listed

Task:
1. Search the dependency manifests and lockfiles (for example package.json, package-lock.json, requirements.txt, poetry.lock, uv.lock, pom.xml, build.gradle, go.mod, Cargo.lock, Gemfile.lock) and any Dockerfiles for the affected packages, including transitive dependencies.
2. If an affected version is in use, upgrade it to the fixed version for its release line with the project's package manager, so the lockfile is regenerated. Prefer the smallest upgrade that fixes it.
3. If there is no fix, or the upgrade would break the build, do not guess: explain the risk and the safest workaround instead.
4. Run the tests and summarise what changed and why.
5. If nothing in the project is affected, say so and change nothing.

Reference: https://insights.sbomify.com/CVE-2026-48501/ (Markdown: https://insights.sbomify.com/CVE-2026-48501/index.md)
```

## Sources

- CVE record: https://www.cve.org/CVERecord?id=CVE-2026-48501
- NVD: https://nvd.nist.gov/vuln/detail/CVE-2026-48501
- OSV: https://osv.dev/vulnerability/CVE-2026-48501

---
From sbomify Insights: https://insights.sbomify.com/CVE-2026-48501/
Summaries are generated and may contain mistakes; the official description above is the record.
