CVE-2026-116686: Model Context Protocol Python SDK: Client fetched server-chosen $ref URLs while validating tool results against output schemas
The MCP Python SDK client fetched URLs chosen by the MCP server while validating tool results. A server could put an http, https or file reference in a tool's outputSchema and make the client request it, or freeze every session in the process. Affects mcp 1.10.0 through 1.29.1 and 2.0.0 through 2.1.1. Fixed in 1.30.0 and 2.2.0.
Published Oct 27, 2026 · Analysis Oct 28, 2026
What an attacker can do
When a server declares an outputSchema for a tool, the client validates each call_tool result with jsonschema's default resolver. That resolver opens the URL of any $ref it cannot resolve locally. A malicious or compromised MCP server can therefore point a $ref at an internal address, a cloud metadata endpoint or a file:// path, and the client will request it from its own network position on every call of that tool. The fetched content is used only as a schema and never sent back to the server, so the main effect is SSRF-style probing and triggering of internal endpoints rather than data theft.
The second effect is a stall. The fetch ran synchronously on the event loop with no timeout. A target that accepts the connection and then goes quiet freezes every session in the process for as long as it holds the connection. That explains the availability rating in the CVSS vector. User interaction is needed because the client must connect to the server and call the tool.
There was no setting to turn this validation off. Any agent or application that uses ClientSession, ClientSessionGroup or the 2.x Client against servers you do not fully control is exposed. Server-only applications are not.
Who is affected
Affected: mcp 1.10.0 through 1.29.1, and mcp 2.0.0 through 2.1.1. It applies to applications that use the SDK as an MCP client (ClientSession over any transport, ClientSessionGroup, or the 2.x Client) and call tools on servers that are not fully trusted. If your code only builds servers and never uses those classes, you are not affected.
Check the version:
pip show mcpmcp
- Ecosystem
- PyPI
- Affected
- >= 2.0.0, < 2.2.0
- Fixed in
- 2.2.0
- Check
pip show mcp
mcp
- Ecosystem
- PyPI
- Affected
- >= 1.10.0, < 1.30.0
- Fixed in
- 1.30.0
- Check
pip show mcp
How to fix it
Upgrade to mcp 1.30.0 (1.x) or 2.2.0 (2.x) or later:
pip install --upgrade "mcp>=1.30.0"The client now resolves references only inside the schema document the server sent, plus the standard JSON Schema metaschemas, so validating a result does no network or file access. A tool whose output schema points outside its own document now fails at call time with RuntimeError ("Invalid schema for tool ..."). In-document references such as #/$defs/... work as before.
Until you can upgrade, call tools only on servers you trust. As a partial stopgap, skip tools whose outputSchema contains an $id, or a $ref or $dynamicRef that does not start with #.
How to tell if you were hit
List the tools your client sees and inspect each outputSchema for an $id, or a $ref or $dynamicRef that does not start with #. Any http, https or file target in a schema from a server you do not control is a red flag.
On the network side, look for outbound requests from the MCP client host to unexpected internal addresses or metadata endpoints that line up with tool calls. Repeated hangs of an agent process during tool calls, with one connection left open, match the stall behavior. After upgrading, the RuntimeError "Invalid schema for tool" in client logs identifies servers that publish external references.
Original advisory
From the GitHub Advisory Database (CC BY 4.0).
Summary
In affected versions, when a connected MCP server declared an outputSchema for a tool, the SDK's client validated each call_tool result with jsonschema's default resolver, which fetches any $ref it cannot resolve locally by opening the URL. A server could therefore put an http://, https:// or file:// reference in a tool's output schema and make the client:
- request that URL, or read that local file, from the client's own network position on every call of the tool (the content was used only as a schema and never sent back to the server), and
- stall: the fetch ran synchronously on the event loop with no timeout, so a target that accepted the connection and then went quiet froze every session in the process for as long as it held the connection.
Am I affected?
Yes, if your application uses the SDK as an MCP client (ClientSession over any transport, ClientSessionGroup, or the 2.x Client) and calls tools on servers you do not fully control. There was no setting that turned the validation off.
Affected versions: 1.10.0 through 1.29.1, and 2.0.0 through 2.1.1.
Not affected: applications that only build servers. If nothing in your code uses ClientSession, ClientSessionGroup or the 2.x Client class, you are not affected.
Fix
Upgrade to mcp 1.30.0 (1.x) or 2.2.0 (2.x) or later. The client now resolves references only within the schema document the server sent (plus the standard JSON Schema metaschemas), so result validation performs no network or file access. A tool whose output schema points outside its own document fails at call time with RuntimeError (Invalid schema for tool ...); in-document references such as #/$defs/... work as before.
Until you can upgrade, call tools only on servers you trust. As a partial stopgap, skip tools whose outputSchema contains an $id, or a $ref / $dynamicRef that does not start with #.
Credited to Hem1700.
Questions
- Does this let a malicious MCP server read my local files?
It can make the client read a file:// target, but the advisory says the content was used only as a schema and never sent back to the server. The reported effects are requests from the client's network position and a stall.
- Can I disable output schema validation to avoid it?
No. The advisory says no setting turned the validation off in affected versions. Upgrade, or skip tools whose schemas carry external references.
- Will the upgrade break my tools?
Only tools whose output schema refers outside their own document. They now fail with RuntimeError at call time. References like #/$defs/... still work.
- Are MCP servers built with the SDK affected?
No. Only applications that act as an MCP client are affected.
References
Read for this analysis:
- https://github.com/advisories/GHSA-rwrf-2pqf-9j8j
- https://github.com/modelcontextprotocol/python-sdk/releases/tag/v1.30.0
- https://github.com/modelcontextprotocol/python-sdk/security/advisories/GHSA-rwrf-2pqf-9j8j
- https://github.com/modelcontextprotocol/python-sdk/pull/3394
- https://github.com/modelcontextprotocol/python-sdk/pull/3396
- https://github.com/modelcontextprotocol/python-sdk/commit/5ebdfed4060d8e5b11b8e2348f86bad4d1fb8836
- https://github.com/modelcontextprotocol/python-sdk/commit/6705402e246dc4eb1fcdf4d9902b78d3c9c36e1b
- https://github.com/modelcontextprotocol/python-sdk/releases/tag/v2.2.0
How this page is made: the data panel comes from the GitHub Advisory Database, CISA’s KEV catalog, the NVD and FIRST EPSS, and updates twice a day. The analysis is written by an AI model from the sources listed above and checked by automated rules before it is published. Check versions against the vendor's advisory before you act. Methodology
Coverage on the Beam blog
More MCP Python SDK vulnerabilities
All MCP Python SDK entriesCVE-2026-115563
Model Context Protocol Python SDK: OAuth client could send credentials to an authorization server chosen by the MCP server
high7.5Nov 19, 2026CVE-2026-116684
Model Context Protocol Python SDK: Server bearer-token authentication accepts tokens issued for a different resource server
medium6.8Oct 27, 2026CVE-2026-116685
Model Context Protocol Python SDK: HTTP client transports followed cross-origin redirects carrying custom headers and bodies
medium5.9Oct 27, 2026CVE-2026-59951
MCP Python SDK: Unbounded Session Accumulation in StreamableHTTP Transport Enables Resource Exhaustion
medium7.5Oct 15, 2026CVE-2026-52869
MCP Python SDK: HTTP transports serve session requests without verifying the authenticated principal
high7.1Jul 16, 2026CVE-2026-52870
MCP Python SDK: Experimental task handlers allow any client to access and cancel other clients' tasks
high7.6Jul 16, 2026
