CVE-2026-52870: MCP Python SDK Experimental Task Handlers Allow Any Vulnerability
HIGHCVE-2026-52870 is a HIGH (CVSS 7.6) experimental task handlers allow any vulnerability (CWE-862: Missing Authorization) affecting MCP Python SDK libraries in the PyPI ecosystem. The issue involves experimental task handlers allow any client to access and cancel other clients' tasks. Remediation is available by upgrading affected packages to version 1.27.2.
CVE-2026-52870 at a Glance
Security Impact
CVSS: 7.6
The security impact metrics below are parsed directly from the CVSS v3.1 vector string (CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:L/A:L).
How to Fix CVE-2026-52870
To remediate this vulnerability, upgrade all affected MCP Python SDK dependencies to a patched release. Both direct and transitive dependencies should be checked, as frameworks or security libraries may pull in vulnerable versions transitively.
pip install mcp>=1.27.2
Run the following command in your project directory to verify that all resolved dependencies use the patched release:
pip show mcp
How to Check if You Are Affected
To determine whether your Python environment is affected by CVE-2026-52870, inspect your installed packages using pip:
pip show mcp
Analyze the terminal output to locate any version of MCP Python SDK in your dependency tree. If any resolved version matches the vulnerable ranges listed in the table below (for example, versions earlier than 1.27.2), your application is affected.
Note: The pip show mcp command checks currently installed packages in your active Python environment.
Technical Details
Vulnerability Mechanism & Technical Analysis
This vulnerability is classified under CWE-862: Missing Authorization, where the product does not perform an authorization check when an actor attempts to access a resource or perform an action. In MCP Python SDK, software state validation or input boundaries are circumvented during processing. Review the official source advisory statement below for specific affected components, classes, and reproduction details.
Source Advisory Statement
CVE-2026-52870 Affected MCP Python SDK Versions
1 component(s)| Product / Package | Ecosystem | Affected Versions | Fixed Version |
|---|---|---|---|
|
mcp
|
PyPI |
≥ 1.23.0
< 1.27.2
|
1.27.2
|
References
Frequently Asked Questions
What is CVE-2026-52870?
Which MCP Python SDK versions are affected?
What version fixes CVE-2026-52870?
Is mcp affected?
What is the CVSS score of CVE-2026-52870?
What CWE is associated with CVE-2026-52870?
How can I check PyPI dependencies for CVE-2026-52870?
Machine-readable OSV JSON
OSV v1.5 Schema
{
"schema_version" : "1.4.0",
"id" : "GHSA-hvrp-rf83-w775",
"modified" : "2026-07-16T19:56:12Z",
"published" : "2026-07-16T19:56:12Z",
"aliases" : [ "CVE-2026-52870" ],
"summary" : "MCP Python SDK: Experimental task handlers allow any client to access and cancel other clients' tasks",
"details" : "### Summary\nIn affected versions, the default request handlers installed by the experimental tasks feature (`server.experimental.enable_tasks()`) did not check which session created a task before acting on it. On a server with more than one connected client, any client could observe, read results from, and cancel tasks belonging to other clients.\n\n### Am I affected?\nOnly if the developer's application server calls `server.experimental.enable_tasks()`. If `grep -r enable_tasks` over their codebase finds nothing, the application is not affected.\n\n### Details\nWhen tasks support is enabled on the low-level server, default handlers are registered for `tasks/list`, `tasks/get`, `tasks/result`, and `tasks/cancel`. These handlers operated on the task identifier alone and kept no record of the session that created each task. Because `tasks/list` returned every task in the store, a connected client did not need to know any identifiers in advance: it could enumerate all tasks, read any task's status and result via `tasks/get` and `tasks/result`, retrieve queued task messages — such as elicitation requests intended for the task's creator, which are removed from the queue on delivery, so the intended recipient never receives them — and cancel any task via `tasks/cancel`.\n\n### Impact\nServers that call `server.experimental.enable_tasks()` and serve multiple clients are affected: one client can read other clients' task results and elicitation payloads, consume messages meant for them, and cancel their tasks. The feature is experimental and opt-in, so servers that never enable it are unaffected. Servers that registered their own task handlers instead of the defaults are affected only if those handlers have the same omission.\n\n### Mitigation\nUpgrade to version 1.27.2 or later, in which task IDs generated by `run_task()` embed an opaque per-session marker and the default handlers restrict each session to its own tasks: requests for another session's task receive \"task not found\", and `tasks/list` returns only the requesting session's tasks. Tasks created with explicitly chosen IDs or written directly through a `TaskStore` remain reachable by ID but are not listed. Alternatively, leave the experimental tasks feature disabled, or register task handlers that validate session ownership.",
"severity" : [ {
"type" : "CVSS_V3",
"score" : "CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:L/A:L"
} ],
"affected" : [ {
"package" : {
"ecosystem" : "PyPI",
"name" : "mcp"
},
"ranges" : [ {
"type" : "ECOSYSTEM",
"events" : [ {
"introduced" : "1.23.0"
}, {
"fixed" : "1.27.2"
} ]
} ],
"database_specific" : {
"last_known_affected_version_range" : "<= 1.27.1"
}
} ],
"references" : [ {
"type" : "WEB",
"url" : "https://github.com/modelcontextprotocol/python-sdk/security/advisories/GHSA-hvrp-rf83-w775"
}, {
"type" : "ADVISORY",
"url" : "https://nvd.nist.gov/vuln/detail/CVE-2026-52870"
}, {
"type" : "WEB",
"url" : "https://github.com/modelcontextprotocol/python-sdk/pull/2720"
}, {
"type" : "WEB",
"url" : "https://github.com/modelcontextprotocol/python-sdk/commit/62137874ff26dd74d2fea80ff528a7fd9ca7a5e7"
}, {
"type" : "PACKAGE",
"url" : "https://github.com/modelcontextprotocol/python-sdk"
}, {
"type" : "WEB",
"url" : "https://github.com/modelcontextprotocol/python-sdk/releases/tag/v1.27.2"
} ],
"database_specific" : {
"cwe_ids" : [ "CWE-862" ],
"severity" : "HIGH",
"github_reviewed" : true,
"github_reviewed_at" : "2026-07-16T19:56:12Z",
"nvd_published_at" : "2026-07-15T20:17:38Z"
}
}