UTC
Low

OAuth middleware endpoints bypass request body limits and allow unauthenticated memory exhaustion

GHSA-f4rf-6ghj-mhr6 · published 2026-11-10

Severity
Low
CVSS score
3.7
Chance of exploitation (EPSS)
No CVE
Fixed in
0.9.0
What it is

The affected endpoints are intentionally reachable before bearer-token authentication. A remote unauthenticated attacker can force a PHP worker to allocate multiple times the supplied request size. Depending on the PHP SAPI and process model, one or repeated requests can terminate workers, exhaust a shared memory budget, increase upstream traffic, and degrade or deny the MCP service. The demonstrated request-to-peak ratio for the combined 16 MiB proof was approximately 8.5x (about 136 MiB peak), although exact amplification varies by PHP version, SAPI, allocator, and which endpoint is exercised. …

What to do

Upgrade mcp/sdk to 0.9.0 or later.

Enforce a shared request-body limit before any route-specific middleware can consume a body. The safest design is an outermost body-limiting middleware used by every POST endpoint, including /token, /register, and future well-known or proxy handlers. The limiter should: 1. Reject a declared Content-Length above the configured limit before reading. 2. Still stream and count the body with a hard cutoff, because chunked requests can omit or lie about Content-Length. 3. Return HTTP 413 without parsing, decoding, rebuilding, logging, or forwarding the oversized body. 4. Apply one documented configuration consistently across the transport and OAuth endpoints. …

Affected
PackageRegistryAffectedFixed in
mcp/sdkPackagist>= 0.8.0, <= 0.8.10.9.0

The impact, patch and workaround text comes from the advisory, shortened (published by the MCP PHP 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].