Improper Task Handling in Python SDK by Model Context Protocol
CVE-2026-52870
7.6HIGH
What is CVE-2026-52870?
The MCP Python SDK (mcp on PyPI), versions 1.23.0 to 1.27.2, contains an improper access control vulnerability. The default handlers used when enabling tasks through server.experimental.enable_tasks() allow interconnected clients to handle task identifiers without safeguarding the originating session. This leads to unauthorized access, allowing clients to enumerate, read, cancel, or consume messages pertaining to tasks initiated by other users. This issue has been resolved in the subsequent version 1.27.2.
Affected Version(s)
python-sdk >= 1.23.0, < 1.27.2
