UTC
High

Missing user ID claims collapse authenticated principals and allow MCP session hijacking

GHSA-x863-g495-4cjc · published 2026-11-03

Severity
High
CVSS score
7.5
Chance of exploitation (EPSS)
No CVE
Fixed in
2.3.1
What it is

An authenticated attacker with a victim session ID can cross the SDK's documented user-binding boundary and act within the victim's stateful MCP server instance. Depending on application configuration and session-scoped capabilities, this can expose user-specific tool names, resources, prompts, server-to-client state, or sensitive tool results; allow state-changing tool calls under the victim session; and let the attacker terminate the session. The attached proof demonstrates confidentiality, integrity, and availability effects using harmless per-session markers. It does not rely on guessing the session ID.

What to do

Upgrade ModelContextProtocol.AspNetCore to 2.3.1 or later.

Do not use one nullable value to represent both an unauthenticated session and an authenticated principal that cannot be identified. 1. If Identity.IsAuthenticated is true but no stable configured identifier can be extracted, fail closed during stateful session creation or reject subsequent session access. 2. Represent ownership as a discriminated state such as Unauthenticated, AuthenticatedWithId, and AuthenticatedWithoutId; never treat the last state as equal across requests. 3. Provide a documented application-configurable user-ID selector for custom authentication schemes, while retaining safe defaults for NameIdentifier, sub, and UPN. …

Affected
PackageRegistryAffectedFixed in
ModelContextProtocol.AspNetCoreNuGet>= 0.1.0-preview.9, < 1.4.21.4.2
ModelContextProtocol.AspNetCoreNuGet>= 2.0.0-preview.1, < 2.3.12.3.1

The impact, patch and workaround text comes from the advisory, shortened (published by the MCP C# SDK project). Proof-of-concept and reproduction sections and code are left out; the original advisory has them.

Sources: GitHub Advisory Database, reviewed and malware advisories (CC BY 4.0, https://github.com/advisories); advisories published by Cursor (https://github.com/cursor/cursor/security/advisories); advisories published by OpenClaw (https://github.com/openclaw/openclaw/security/advisories); advisories published by vLLM (https://github.com/vllm-project/vllm/security/advisories); advisories published by Open WebUI (https://github.com/open-webui/open-webui/security/advisories); advisories published by n8n (https://github.com/n8n-io/n8n/security/advisories); advisories published by Flowise (https://github.com/FlowiseAI/Flowise/security/advisories); advisories published by Langflow (https://github.com/langflow-ai/langflow/security/advisories); advisories published by the MCP Python SDK project (https://github.com/modelcontextprotocol/python-sdk/security/advisories); advisories published by the MCP reference servers project (https://github.com/modelcontextprotocol/servers/security/advisories); advisories published by the MCP Inspector project (https://github.com/modelcontextprotocol/inspector/security/advisories); advisories published by the MCP TypeScript SDK project (https://github.com/modelcontextprotocol/typescript-sdk/security/advisories); advisories published by the MCP Go SDK project (https://github.com/modelcontextprotocol/go-sdk/security/advisories); advisories published by the MCP Java SDK project (https://github.com/modelcontextprotocol/java-sdk/security/advisories); advisories published by the MCP Kotlin SDK project (https://github.com/modelcontextprotocol/kotlin-sdk/security/advisories); advisories published by the MCP Rust SDK project (https://github.com/modelcontextprotocol/rust-sdk/security/advisories); advisories published by the MCP Ruby SDK project (https://github.com/modelcontextprotocol/ruby-sdk/security/advisories); advisories published by the MCP C# SDK project (https://github.com/modelcontextprotocol/csharp-sdk/security/advisories); advisories published by the MCP PHP SDK project (https://github.com/modelcontextprotocol/php-sdk/security/advisories); advisories published by the MCP Registry project (https://github.com/modelcontextprotocol/registry/security/advisories); advisories published by Open Terminal (https://github.com/open-webui/open-terminal/security/advisories); advisories published by MLflow (https://github.com/mlflow/mlflow/security/advisories); CISA Known Exploited Vulnerabilities catalog (CC0). Data as of 2026-12-06. ShieldMap describes how each problem works and how to fix it; it does not publish exploit code. Report a correction to [email protected].