gemini-cli PR #30071 routes MCP OAuth fetches through safe dispatcher to stop DNS rebinding

ranas-mukminov · ghdev · 2026-11-01

PR #30071 in google-gemini/gemini-cli fixes a security gap: MCP OAuth metadata and registration fetches were validated only at check time but then sent through the plain global dispatcher, enabling a DNS-rebinding scenario (public resolution at check, private at connect). The change routes fetchProtectedResourceMetadata(), fetchAuthorizationServerMetadata() and registerClient() through the dispatcher from createSafeAgent(); explicitly allowed private/loopback servers keep working. 505 targeted tests passed, typecheck/lint/build clean. Author notes it's hardening only — no live rebinding demo, no credential exposure, token exchange untouched.

Original post →

More from coding & agent

coding & agent channel →