gemini-cli patches SSRF flaw in MCP OAuth metadata discovery flows
josebalius · ghdev · 2026-08-25
Google's gemini-cli received a security PR fixing SSRF risks in MCP OAuth metadata discovery, dynamic client registration, and token exchange/refresh flows.
Attack vector: a malicious remote MCP server could use unvalidated WWW-Authenticate challenges or authorizationservers URLs to make the client issue requests to internal IPs, localhost, or cloud metadata services (169.254.169.254).
Key protections:
- Enforce HTTPS for remote endpoints per RFC 9728 §7.7 / RFC 8414 (HTTP only for loopback with local MCP servers)
- Origin matching for resourcemetadata challenges
- Block private IPv4/IPv6, loopback, link-local/IMDS, benchmark, and multicast ranges
- Async DNS resolution to prevent DNS rebinding
- Validate registration/token endpoints before requests, plus comprehensive test coverage
More from coding & agent
- Seedance 2.0 unlimited for $5: Dreamina CLI lets your agent run video generation end-to-end — Aiden_Tech_Ai · 2026-11-30
- Business-prose model open-sourced: trained on a single 96GB GPU, all quant formats in one repo — IridiumEagle · 2026-11-30
- Ambient open-sources anti-slop writing model trained on a single 96GB RTX PRO 6000 — IridiumEagle · 2026-11-30
- Devs say vibe-coding workflow is draining the joy of programming — weskambale · 2026-11-30
- Slipwing: Open-Source Windows MCP Server Lets Agents Drive Chrome and Desktop Apps in the Background — Sudden_Analysis8617 · 2026-11-30
- ByteDance's TRAE launches TRAE Bao: a cloud-based coding assistant you control from your phone — xiaohu · 2026-11-30