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

Published Jul 15, 2026
·
Updated

Summary In affected versions, the default request handlers installed by the experimental tasks feature (server.experimental.enabletasks()) 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.

Am I affected? Only if the developer's application server calls server.experimental.enabletasks(). If grep -r enabletasks over their codebase finds nothing, the application is not affected.

Details When 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.

Impact Servers that call server.experimental.enabletasks() 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.

Mitigation Upgrade to version 1.27.2 or later, in which task IDs generated by runtask() 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.

Other sources

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.enabletasks() 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.

NVD

Affected Software

3 affected componentsFixes available
pypi/mcp>=1.23.0<1.27.2
pip/mcp>=1.23.0<=1.27.1
1.27.2
Lfprojects Mcp Python Sdk>=1.23.0<1.27.2

Remediation

Recommended actions to resolve this vulnerability, in priority order.

  1. Upgrade

    Upgrade pip/mcp to a version that resolves this vulnerability.

    Fixed in 1.27.2
  2. Upgrade

    Upgrade MCP Python SDK (mcp on PyPI) to a version that resolves this vulnerability.

    Fixed in 1.27.2
  3. Configuration

    Do not call server.experimental.enable_tasks(); if you must use it, only do so when you need multi-client access, otherwise leave experimental task handlers disabled.

    MCP Python SDK (mcp) experimental tasks feature server.experimental.enable_tasks() = disabled

Event History

Jul 15, 2026
CVE Published
via MITRE·08:07 PM
Data Sourced
via MITRE·08:07 PM
DescriptionSeverityWeakness
Data Sourced
via NVD·08:17 PM
RemedyDescriptionSeverityWeaknessAffected Software
Jul 16, 2026
Advisory Published
via GitHub·07:56 PM
Data Sourced
via GitHub·07:56 PM
DescriptionSeverityWeaknessAffected Software
Free Weekly Intel

Don't miss critical vulnerabilities

Join thousands of security professionals who receive our weekly digest of trending CVEs, zero-days, and exploited vulnerabilities.

No spam. Unsubscribe anytime.

Frequently Asked Questions

1

What is the severity of CVE-2026-52870?

CVE-2026-52870 has a high severity rating of 7.6.

2

How do I fix CVE-2026-52870?

You can fix CVE-2026-52870 by upgrading to a version of the MCP Python SDK later than 1.27.2.

3

What types of tasks are affected by CVE-2026-52870?

CVE-2026-52870 affects the experimental task handlers for tasks/list, tasks/get, tasks/result, and tasks/cancel.

4

Who is impacted by CVE-2026-52870?

Any client using the MCP Python SDK versions 1.23.0 to 1.27.2 is vulnerable to CVE-2026-52870.

5

What happens if I don't address CVE-2026-52870?

If not addressed, CVE-2026-52870 allows unauthorized clients to access and cancel other clients' tasks, leading to potential data exposure or disruption.

Contact

SecAlerts Pty Ltd.
132 Wickham Terrace
Fortitude Valley,
QLD 4006, Australia
info@secalerts.co
By using SecAlerts services, you agree to our services end-user license agreement. This website is safeguarded by reCAPTCHA and governed by the Google Privacy Policy and Terms of Service. All names, logos, and brands of products are owned by their respective owners, and any usage of these names, logos, and brands for identification purposes only does not imply endorsement. If you possess any content that requires removal, please get in touch with us.
© 2026 SecAlerts Pty Ltd.
ABN: 70 645 966 203, ACN: 645 966 203