Intel

AIKIDO-2026-260859

mcp is vulnerable to Server-Side Request Forgery (SSRF)

Server-Side Request Forgery (SSRF)GHSA-4m5j-jjfc-97gx Published 2 days ago

47

Medium Risk

This Affects:

RUBYmcp
0.17.0 - 1.1.0
Fixed in 1.2.0
Are you affected? Scan for Free

TL;DR

The OAuth client validates a server-controlled resource_metadata URL taken from the WWW-Authenticate header using a check that only enforces the HTTPS scheme. Because the check does not restrict private, loopback, link-local, or cloud-metadata destinations and reads only the dotted-decimal form of an address, a malicious or compromised MCP server can point discovery at internal HTTPS services or the cloud metadata endpoint. The client issues the request automatically during OAuth discovery from its own network position, before any user approval, resulting in blind server-side request forgery. The fix restricts discovery destinations to same-origin, routable hosts and rejects private and metadata addresses including alternate numeric spellings.

Who does this affect?

You are affected if you are using a version that falls within the vulnerable range and your application uses the OAuth client to connect to an untrusted MCP server whose responses can direct discovery to internal HTTPS endpoints.

Background info

mcp is vulnerable to Server-Side Request Forgery (SSRF) in versions 0.17.0 - 1.1.0.

How to fix this

Upgrade the mcp library to the patch version.