Skip to content
MediumVulnerability

GHSA-rwrf-2pqf-9j8j: Model Context Protocol Python SDK: Client fetched server-chosen $ref URLs while validating tool results against output schemas

Published
Record updated
View JSON
Affected
  • mcp >= 1.10.0, < 1.30.0, fixed in 1.30.0
  • mcp >= 2.0.0, < 2.2.0, fixed in 2.2.0
Known exploitation
Not listed in the CISA Known Exploited Vulnerabilities catalog at the last check.

Summary

The Model Context Protocol Python SDK's client validated tool results against server-declared outputSchema using jsonschema's default resolver, which fetched any unresolved $ref by opening the URL. A malicious server could make the client request http, https or file URLs from its own network position on every call, and because the fetch ran synchronously with no timeout, a target that stalled would freeze all sessions in the process. Affected versions are 1.10.0 through 1.29.1 and 2.0.0 through 2.1.1, for applications that use the SDK as a client.

Mitigation

Fixed in mcp 1.30.0 (1.x) and 2.2.0 (2.x). The client now resolves references only within the server-sent schema document plus the standard JSON Schema metaschemas. Until upgrading, call tools only on trusted servers. As a partial stopgap, skip tools whose outputSchema contains an $id, or a $ref or $dynamicRef that does not start with #.