CVE-2026-52870

MCP Python SDK: Experimental task handlers allow any client to access and cancel other clients' tasks

Published Jul 15, 2026 CVSS 3.1 · 7.6 High EPSS < 1% KEV · Not listed
Description
The MCP Python SDK, called mcp on PyPI, is a Python implementation of the Model Context Protocol (MCP). From 1.23.0 until 1.27.2, default handlers installed by server.experimental.enable_tasks() for tasks/list, tasks/get, tasks/result, and tasks/cancel operate only on task identifiers without recording the session that created each task, allowing any connected client to enumerate, read results from, consume messages for, or cancel other clients' tasks. This issue is fixed in version 1.27.2.

Analysis

AI-generated

Technical impact

The MCP Python SDK, known as mcp on PyPI, implements the Model Context Protocol. Between versions 1.23.0 and 1.27.2 the default handlers installed by server.experimental.enable_tasks()—specifically tasks/list, tasks/get, tasks/result, and tasks/cancel—operate only on task identifiers and do not record, and therefore do not verify, the session that created each task. As a result, any connected client can enumerate, read results from, consume messages for, or cancel tasks belonging to other clients. This missing access‑control flaw (CWE-862) enables an attacker to access or interfere with tasks they should not be authorized to manipulate. The issue is resolved in version 1.27.2.

Affected Systems

Vendors and products affected include the ModelContextProtocol Python SDK, specifically versions 1.23.0 up to and including 1.27.2. The issue is resolved in the 1.27.2 release; users of earlier releases are vulnerable.

Risk and Exploitability

The CVSS score of 7.6 indicates a high severity risk, though the EPSS score of less than 1% suggests a very low current exploitation probability. Based on the description, it is inferred that the attack vector is primarily internal: any client authorized to connect to the MCP server can exploit the flaw. The vulnerability is not listed in the CISA KEV catalog, so widespread compromise has not yet been observed, but the potential for unauthorized task interference remains significant for environments with multiple clients.

Remediation

No solution or workaround provided in the CVE record.

OpenCVE Recommended Actions

  • Upgrade the Python SDK to version 1.27.2 or later, where the bug has been fixed to record the session for task handlers.
  • If an upgrade is not immediately possible, disable the experimental task feature by removing or commenting out the server.experimental.enable_tasks() invocation so the vulnerable handlers are not activated.
  • Restrict network access to the MCP server by configuring firewall rules or network segmentation to allow only trusted hosts to connect, thereby reducing exposure of the vulnerable task handlers.

Generated by OpenCVE AI on August 1, 2026 at 08:49 UTC.

Tracking

Sign in to view the affected projects.

Advisories

Source ID Title
Github GHSA Github GHSA GHSA-hvrp-rf83-w775 MCP Python SDK: Experimental task handlers allow any client to access and cancel other clients' tasks
History
Type Values Removed Values Added
Metrics ssvc

{'options': {'Automatable': 'no', 'Exploitation': 'none', 'Technical Impact': 'partial'}, 'version': '2.0.3'}

Type Values Removed Values Added
First Time appeared Modelcontextprotocol
Modelcontextprotocol python-sdk
Vendors & Products Modelcontextprotocol
Modelcontextprotocol python-sdk
Type Values Removed Values Added
Description The MCP Python SDK, called mcp on PyPI, is a Python implementation of the Model Context Protocol (MCP). From 1.23.0 until 1.27.2, default handlers installed by server.experimental.enable_tasks() for tasks/list, tasks/get, tasks/result, and tasks/cancel operate only on task identifiers without recording the session that created each task, allowing any connected client to enumerate, read results from, consume messages for, or cancel other clients' tasks. This issue is fixed in version 1.27.2.
Title MCP Python SDK: Experimental task handlers allow any client to access and cancel other clients' tasks
Weaknesses CWE-862
References
Metrics cvssV3_1

{'score': 7.6, 'vector': 'CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:L/A:L'}

Weaknesses

Sources

Status
PUBLISHED
Assigner
GitHub_M
Published
Updated
Jul 16, 2026, 1:01 PM
Reserved
Jun 8, 2026, 9:44 PM
Status
Analyzed
Published
Jul 15, 2026, 8:17 PM
Modified
Oct 24, 2026, 9:10 PM