---
schema_version: '1.0'
id: security-20260724-13fb1a
url: https://osv.dev/vulnerability/PYSEC-2026-3481
url_hash: 13fb1a172e2020fa162d3f20cb9b074bed461f5e20b78ef75fb327d19f087a44
canonical_url: https://osv.dev/vulnerability/PYSEC-2026-3481
source: osv:pypa
category: security/library
category_raw: cve/library
region: null
tags:
- cve
- CVE-2026-52870
- PYSEC-2026-3481
- severity:CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:L/A:L
- mcp
- PyPI
lang: en
published_at: '2026-07-23T11:41:46Z'
fetched_at: '2026-07-24T07:01:54.521927Z'
updated_at: '2026-07-24T07:02:21Z'
status: published
content_hash: 7a7c0d07ec3303ab07f72530100e6bf782c3db60465fce08f1cc196b28cb8f80
content_changed_at: null
license_note: full
summary: 'MCP Python SDK: Experimental task handlers allow any client to access and
  cancel other clients'' tasks'
summary_source: rss
summary_en: 'MCP Python SDK: Experimental task handlers allow any client to access
  and cancel other clients'' tasks'
entities:
- name: CVE-2026-44243
  type: data
- name: MCP
  type: concept
- name: Python REPL
  type: UNKNOWN
- name: Experimental
  type: event
key_facts: []
related: []
related_auto:
- name: Win11
  type: content
  weight: 2.0
- name: 本人・法人認証
  type: UNKNOWN
  weight: 1.0
- name: 監査ログ
  type: UNKNOWN
  weight: 1.0
- name: agent_d_bot
  type: person
  weight: 1.0
title: 'CVE-2026-52870: MCP Python SDK: Experimental task handlers allow any client
  to access and cancel other clients'' tasks'
---

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

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

## Key Points
- cve / CVE-2026-52870 / PYSEC-2026-3481 / severity:CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:L/A:L / mcp / PyPI

## Details
**Severity:** CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:L/A:L
**Advisory:** PYSEC-2026-3481 (CVE-2026-52870)

**Affected (your watchlist):**
- `PyPI:mcp` 1.26.0 → fixed in 1.27.2 [docker/local+docker/mac]

**Details:**
### Summary
In 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.

### Am I affected?
Only 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.

### 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.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.

### Mitigation
Upgrade 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.

**References:**
- https://github.com/modelcontextprotocol/python-sdk/security/advisories/GHSA-hvrp-rf83-w775
- https://nvd.nist.gov/vuln/detail/CVE-2026-52870
- https://github.com/modelcontextprotocol/python-sdk/pull/2720
- https://github.com/modelcontextprotocol/python-sdk/commit/62137874ff26dd74d2fea80ff528a7fd9ca7a5e7
- https://github.com/modelcontextprotocol/python-sdk
- https://github.com/modelcontextprotocol/python-sdk/releases/tag/v1.27.2
- https://pypi.org/project/mcp
- https://github.com/advisories/GHSA-hvrp-rf83-w775

_Data: OSV.dev (upstream: pypa) — https://osv.dev/vulnerability/PYSEC-2026-3481_

## Source
元記事: [CVE-2026-52870: MCP Python SDK: Experimental task handlers allow any client to access and cancel other clients' tasks](https://osv.dev/vulnerability/PYSEC-2026-3481) — published 2026-07-23T11:41:46Z
