Skip to content

AAK-MCP-JAVASDK-CVE-2026-108395-001: MCP Java SDK 0.8.0 to 0.18.3, 1.0.0 to 1.1.3 and 2.0.0: the Servlet HTTP server transports read request bodies of any size

Severity
HIGH
Category
Supply Chain (supply-chain)
Scanner
agent_audit_kit/scanners/jvm_mcp_sdk_pins.py
Auto-fixable
No.
SARIF name
McpJavaSdkServletUnboundedBody

What it detects

The MCP Java SDK's Servlet-based server transports (HttpServletSseServerTransportProvider, HttpServletStreamableServerTransportProvider and HttpServletStatelessServerTransport) read a POST body line by line into a StringBuilder with no size limit. An unauthenticated client that can reach one can stream an arbitrarily large body, chunked or not, until the JVM runs out of heap (CVE-2026-108395, CVSS 3.1 7.5, CWE-770). The transports are in io.modelcontextprotocol.sdk:mcp from 0.8.0 to 0.12.1 and in mcp-core from 0.13.0, and the mcp bundle depends on mcp-core at its own version. Checked in the source: the SSE provider reads without a limit from 0.8.0, where it arrives, and all three do at 0.12.1, 0.13.0, 0.18.3, 1.0.0-RC3, 1.0.2, 1.1.3, 2.0.0-M1, 2.0.0-RC1 and 2.0.0. 0.18.4, 1.1.4 and 2.0.1 read through a bounded readBody, and the 1.0.x line has no fixed release.

How to fix

Upgrade mcp or mcp-core, or the mcp-bom that sets their version, to 0.18.4, 1.1.4 or 2.0.1 or later on your release line, or to 2.1.0, the newest. On 1.0.x, move to 1.1.4. Until then, put a reverse proxy or gateway that limits the request body size in front of the server.

To confirm the finding is gone, report only this rule:

agent-audit-kit scan . --rules AAK-MCP-JAVASDK-CVE-2026-108395-001

Limitations

Dependency-level detection on JVM manifests only: build.gradle, build.gradle.kts, gradle/libs.versions.toml and pom.xml. Reports io.modelcontextprotocol.sdk:mcp and mcp-core from 0.8.0 below 0.18.4, from 1.0.0 below 1.1.4, and at 2.0.0, where a version resolves in the file, directly or through an mcp-bom in the same file. 1.0.0-RC3 reads as 1.0.0 and the 2.0.0 milestones as 2.0.0, and both are affected. It reads versions, not code, so a server that uses only stdio, or has a body-size limit in front of it, is reported too. The SDK that Spring AI's starters or spring-ai-bom pull in is not read, and neither is a dynamic version or a version.ref to a catalog outside the scanned tree. 0.7.0's older HttpServletSseServerTransport reads the body the same way, but the CVE record starts at 0.8.0, so 0.7.0 is not reported.

References


All rules. This page is generated from the rule registry when the documentation is built; to change it, change the rule in agent_audit_kit/rules/builtin.py. To give the rule a hand-written write-up, add docs/rules/AAK-MCP-JAVASDK-CVE-2026-108395-001.md: the page then shows that text, with the registry reference appended under it.