Gemini CLI remembered OAuth credentials under an MCP server name. When a configuration change moved that named server to a different URL, the client reused the token and attached it to requests toward the new host without requiring new origin consent. The reporter captured two local token-bearing POST requests reaching a replacement host. This demonstrates…
Inspect the ClaimsCase · DiggingBeagle record
Gemini CLI reused a stored MCP OAuth token after its server URL changed
The reporter captured two local token-bearing POST requests reaching a replacement host.
Published by DiggingBeagle:
An MCP connection already authorized under one name, with later configuration or workspace influence over that name's URL.
Assessment profile
Assessment method- Setting
- research demonstration
- Exploitation
- demonstrated
- Evidence
- Grade B
- AI role
- AGAINST AI
Basis and provenance
The cited primary source supports the stated mechanism and scoped outcome. Impact band remains unrated because no calibrated victim exposure or severity distribution is established by the cited evidence.
Assessed Nov 22, 2026 using diggingbeagle.assessment/1.
Evidence basis: CLM-2026-NOV22-GEMINI-CLI-MCP-TOKEN-MECHANISM · CLM-2026-NOV22-GEMINI-CLI-MCP-TOKEN-SCOPE · Gemini CLI issue #30391: stored MCP OAuth token replayed to changed server URL
At a glance
Credential cache keys based only on a friendly server name are unsafe when that name can be repointed. The security decision should bind the token to its original canonical issuer and destination and require renewed consent for a changed endpoint; two local POSTs establish a test case, not a measured victim population.
Read the implicationsExposure depends on who can change MCP configuration and whether subsequent operations send the token; a fix cannot be claimed shipped without a merged release.
Limits and uncertaintyFull account
Gemini CLI remembered OAuth credentials under an MCP server name. When a configuration change moved that named server to a different URL, the client reused the token and attached it to requests toward the new host without requiring new origin consent.
The reporter captured two local token-bearing POST requests reaching a replacement host. This demonstrates the destination-binding issue in the tested CLI state, but not a known production credential theft campaign. At the time reported, the related fix was still under discussion. The critical boundary is OAuth tokens provisioned for one MCP resource being forwarded to an unrelated configured transport endpoint.
The documented repair is bind saved tokens to canonical resource origin and require reauthorization whenever that origin changes. Exposure depends on who can change MCP configuration and whether subsequent operations send the token; a fix cannot be claimed shipped without a merged release.
Mechanism and trust boundary
- 01
Authorize an MCP server under a local name
A user completes OAuth and Gemini CLI stores bearer material for the configured server label.
Boundary: Credential scoped to original MCP service identity
- 02
Retarget that label
Configuration or workspace control changes the server URL while preserving the old name used for token lookup.
Boundary: Mutable server alias replaces authenticated resource origin
- 03
Send credential to replacement host
The CLI attaches the saved bearer token to requests to the new URL; the reporter captured two such POSTs in a local reproduction.
Boundary: MCP OAuth credential disclosure across origins
Claims & evidence
CLM-2026-NOV22-GEMINI-CLI-MCP-TOKEN-SCOPEThe reporter captured two local token-bearing POST requests reaching a replacement host. This demonstrates the destination-binding issue in the tested CLI state, but not a known production credential theft campaign. At the time reported, the related fix was still under discussion.supported
Basis: reported finding
- supportsGemini CLI issue #30391: stored MCP OAuth token replayed to changed server URLprimary disclosure
Primary advisory or study: reproduction, results and limitations
CLM-2026-NOV22-GEMINI-CLI-MCP-TOKEN-MECHANISMGemini CLI remembered OAuth credentials under an MCP server name. When a configuration change moved that named server to a different URL, the client reused the token and attached it to requests toward the new host without requiring new origin consent.supported
Basis: reported finding
- supportsGemini CLI issue #30391: stored MCP OAuth token replayed to changed server URLprimary disclosure
Primary advisory or study: technical mechanism and affected component
- supportsGemini CLI issue #30391: stored MCP OAuth token replayed to changed server URLprimary disclosure
Gemini CLI issue #30391: stored OAuth token keyed by server name, repointed URL and two local captured POSTs
Implications
Credential cache keys based only on a friendly server name are unsafe when that name can be repointed. The security decision should bind the token to its original canonical issuer and destination and require renewed consent for a changed endpoint; two local POSTs establish a test case, not a measured victim population.
Controls and mitigations
- bind saved tokens to canonical resource origin and require reauthorization whenever that origin changes
Unknowns and contradictions
- Exposure depends on who can change MCP configuration and whether subsequent operations send the token; a fix cannot be claimed shipped without a merged release.
Sources and citation
Material revision history
- Nov 22, 2026 · Published version · first publication · revision 275