Gemini CLI PR binds MCP OAuth tokens to issuing server URL to stop token replay
Subhan1794 · ghdev · 2026-11-26
PR #30475 in google-gemini/gemini-cli fixes a security flaw where OAuth tokens for MCP servers were stored by server name without URL binding. If a server's URL was repointed — by typo, config edit, or attack — the stored token would silently be replayed to the new origin without re-consent.
The fix records mcpServerUrl at authentication time and checks same-origin binding on every code path that sends the token (10 files, +834/-9). On mismatch the token is withheld rather than deleted, the user is asked to re-authenticate via /mcp auth, and token refresh is only ever sent to the originally recorded URLs.
More from coding & agent
- He built LinkedMCP so Claude runs his LinkedIn for $7/month — pavlito88 · 2026-11-26
- Webround demos Figma-to-website pipeline powered by Claude Code — GSkylineR34 · 2026-11-26
- Why AI code reviews never say 'it's fine': RLHF makes models invent suggestions — bendee983 · 2026-11-26
- Turn a Mac mini into a $0 remote dev box with Cloudflare Tunnel and zero open ports — emeka_boris · 2026-11-26
- Alex Edwards publishes Go's Tooling v2: a 2026 survey of dev, quality, testing and AI tools — rseroter · 2026-11-26
- JetBrains Launches Junie Eco Mode: Splitting AI Coding into Planning and Cheap Execution — kimmonismus · 2026-11-26