Menu

Why MCP OAuth Discovery Leads to SSRF
📰

Why MCP OAuth Discovery Leads to SSRF

DEV Community: node·Stefan·1 day ago
#BMHNOy0r
#devtonodejs#devto#dev#server#client
Reading 0:00
15s threshold

When your Model Context Protocol (MCP) client connects to a new tool server, it often starts an OAuth handshake before exchanging any tool definitions. To do that without hardcoded credentials, modern MCP implementations rely on dynamic discovery.

Before your client opens a login page, it fetches a small JSON file. That file tells the client which authorisation server to trust, which token endpoints to query and which signing keys to verify. The trouble is that the remote MCP server chooses that URL. If an attacker controls the server, they control where your client sends its next HTTP request.

If the client fetches that URL without strict network controls, an attacker can point it straight at your local machine, your internal Kubernetes network or your cloud metadata service.…

Continue reading — create a free account

Join HashtagPLUS to read full articles, follow hashtags, vote, and join the conversation.