{"id":"CVE-2026-116686","kind":"vulnerability","aliases":["CVE-2026-116686","GHSA-rwrf-2pqf-9j8j"],"related":[],"title":"Model Context Protocol Python SDK: Client fetched server-chosen $ref URLs while validating tool results against output schemas","description":"### Summary\nIn 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:\n\n- 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\n- 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.\n\n### Am I affected?\nYes, 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.\n\nAffected versions: 1.10.0 through 1.29.1, and 2.0.0 through 2.1.1.\n\nNot affected: applications that only build servers. If nothing in your code uses `ClientSession`, `ClientSessionGroup` or the 2.x `Client` class, you are not affected.\n\n### Fix\nUpgrade 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.\n\nUntil 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 `#`.","summary":"The official Model Context Protocol Python SDK resolves $ref values in server-declared outputSchema documents with a default resolver. A malicious MCP server can make the client fetch HTTP, HTTPS or local file URLs, and block the event loop without a timeout.","severity":"medium","cvss":6.5,"epss":null,"exploited":false,"exploited_at":null,"products":[{"name":"mcp","fixed":["2.2.0"],"affected":">= 2.0.0, < 2.2.0","ecosystem":"pypi"},{"name":"mcp","fixed":["1.30.0"],"affected":">= 1.10.0, < 1.30.0","ecosystem":"pypi"}],"ecosystems":["pypi"],"tags":["ai-agents","ai-tooling","cwe-918","mcp","python"],"not_affected_if":["default-config"],"how_to_check":"- Check the installed SDK version with `pip show mcp` and confirm whether it is between `1.10.0` and `1.30.0` or `2.0.0` to `2.2.0`\n- Search the project lock files for `mcp` to find every service that uses the SDK","fix":"- Upgrade the `mcp` Python package to `1.30.0` or `2.2.0`\n- Rebuild and redeploy services that bundle the SDK","status":"open","published_at":"2026-10-27T20:17:13+00:00","first_seen_at":"2026-10-27T20:33:27+00:00","triaged_at":"2026-10-27T20:35:33+00:00","updated_at":"2026-10-27T21:09:20+00:00","category":"ai-tooling","confidence":0.7,"triage":{"at":"2026-10-27T20:35:33Z","model":"claude-haiku-5-5","output":{"fix":"- Upgrade the `mcp` Python package to `1.30.0` or `2.2.0`\n- Rebuild and redeploy services that bundle the SDK","reach":"network","title":"MCP Python SDK: malicious server schema makes clients fetch URLs","impact":"medium","summary":"The official Model Context Protocol Python SDK resolves $ref values in server-declared outputSchema documents with a default resolver. A malicious MCP server can make the client fetch HTTP, HTTPS or local file URLs, and block the event loop without a timeout.","category":"ai-tooling","nicknames":[],"who_cares":["mcp","python","ai-agents"],"confidence":0.7,"needs_auth":"no","worst_case":"Client makes blind requests and reads local files; event loop stalls","analyst_note":"","how_to_check":"- Check the installed SDK version with `pip show mcp` and confirm whether it is between `1.10.0` and `1.30.0` or `2.0.0` to `2.2.0`\n- Search the project lock files for `mcp` to find every service that uses the SDK","needs_analyst":false,"not_affected_if":["default-config"],"who_is_affected":"Applications that act as MCP clients in Python and connect to MCP servers they do not fully trust, through ClientSession, ClientSessionGroup or Client tool calls. Exposure depends on the client connecting to remote or third-party servers; clients that only talk to trusted local servers face lower risk.","user_interaction":"no","needs_special_setup":"no","severity_if_unknown":"medium"},"cost_usd":0.000614,"input_tokens":3439,"output_tokens":541,"severity_before":"medium"},"analyst_status":null,"analyst_note":null,"search":"'-116686':22A,30A '-2026':21A,29A '-918':40B '1':301C '1.10.0':264C '1.29.1':266C '1.30.0':300C '2':240C,288C,305C '2.0.0':268C '2.1.1':270C '2.2.0':304C '2pqf':26A '9j8j':27A 'accept':198C 'access':336C 'affect':88C,221C,262C,272C,295C 'agent':35B 'ai':34B,37B 'ai-ag':33B 'ai-tool':36B 'applic':225C,273C 'back':177C 'block':79B 'build':276C 'call':107C,162C,244C,349C,371C 'cannot':120C 'chosen':10A 'class':291C 'client':6A,70B,104C,144C,155C,232C,242C,290C,310C 'clientsess':233C,284C 'clientsessiongroup':237C,285C 'code':282C 'connect':92C,200C,218C 'contain':386C 'content':167C 'context':2A,46B 'control':252C 'could':129C 'cve':20A,28A 'cwe':39B 'declar':56B,95C 'def':363C 'default':61B,113C 'document':58B,318C,346C,359C 'dynamicref':392C 'event':81B,189C 'everi':161C,206C 'fail':347C 'fetch':7A,71B,116C,184C 'file':76B,152C,335C 'fix':296C 'froze':205C 'fulli':251C 'ghsa':24A 'ghsa-rwrf-2pqf-9j8j':23A 'held':216C 'http':72B 'https':73B 'id':388C 'in-docu':357C 'invalid':353C 'json':325C 'jsonschema':111C 'later':308C 'local':75B,122C,151C 'long':213C 'loop':82B,190C 'make':68B,142C 'malici':64B 'mcp':31A,32A,41B,65B,93C,231C,299C 'metaschema':327C 'model':1A,45B 'network':158C,333C 'never':175C 'noth':279C 'offici':44B 'open':124C 'output':18A,139C,340C 'outputschema':57B,97C,385C 'outsid':343C 'partial':380C 'perform':331C 'plus':322C 'point':342C 'posit':159C 'process':210C 'protocol':3A,47B 'put':131C 'python':4A,42B,48B 'quiet':204C 'ran':185C 'read':149C 'ref':11A,51B,118C,391C 'refer':134C,313C,360C 'request':145C 'resolv':50B,62B,114C,121C,312C 'result':16A,109C,329C 'runtimeerror':352C 'rwrf':25A 'schema':19A,140C,173C,317C,326C,341C,354C 'sdk':5A,49B,102C,228C 'sent':176C,321C 'server':9A,55B,66B,94C,128C,180C,247C,277C,320C,375C 'server-chosen':8A 'server-declar':54B 'session':207C 'set':256C 'skip':382C 'stall':182C 'standard':324C 'start':396C 'stopgap':381C 'summari':86C 'synchron':186C 'target':196C 'therefor':130C 'time':350C 'timeout':85B,193C 'tool':15A,38B,100C,108C,137C,165C,245C,338C,356C,372C,383C 'transport':236C 'trust':377C 'turn':258C 'upgrad':297C,370C 'url':12A,77B,126C,147C 'use':169C,226C,283C 'valid':14A,105C,260C,330C 'valu':52B 'version':89C,263C 'went':203C 'whose':339C,384C 'within':315C 'without':83B 'work':364C 'x':241C,289C,302C,306C 'yes':222C","nicknames":[],"mitigations":[],"who_affected":"Applications that act as MCP clients in Python and connect to MCP servers they do not fully trust, through ClientSession, ClientSessionGroup or Client tool calls. Exposure depends on the client connecting to remote or third-party servers; clients that only talk to trusted local servers face lower risk.","tier":"B","verified":{},"analyst_revisit_at":null,"first_public_at":"2026-10-27T20:17:13+00:00","kev":null,"cvss_vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:N/I:N/A:H","cvss_by":"GitHub","poc_count":0,"sources":[{"source":"nvd","external_id":"CVE-2026-116686","url":"https://nvd.nist.gov/vuln/detail/CVE-2026-116686","severity":null,"published_at":"2026-10-27T20:17:13+00:00","modified_at":"2026-10-27T20:17:13+00:00","first_seen_at":"2026-10-27T20:33:27+00:00","fetched_at":"2026-10-27T20:33:27+00:00","note":null},{"source":"ghsa","external_id":"GHSA-rwrf-2pqf-9j8j","url":"https://github.com/advisories/GHSA-rwrf-2pqf-9j8j","severity":"medium","published_at":"2026-10-27T21:05:29+00:00","modified_at":"2026-10-27T21:05:30+00:00","first_seen_at":"2026-10-27T21:09:20+00:00","fetched_at":"2026-10-27T21:09:20+00:00","note":null}],"documents":[],"notice":"Free to read at a human pace. An API with keys and an MCP server are in preparation; early access: hello@infrastack.ai"}