Skip to content

AAK-MCP-KOTLINSDK-CVE-2026-108714-001: MCP Kotlin SDK from 0.7.3: Application.mcpWebSocket accepts WebSocket frames of any size (no fixed release)

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

What it detects

The MCP Kotlin SDK server module (io.modelcontextprotocol:kotlin-sdk-server, which the kotlin-sdk umbrella pulls in) has an Application.mcpWebSocket extension that installs Ktor's WebSockets plugin with no maxFrameSize, so Ktor's default of Long.MAX_VALUE applies. A remote client can send small frame headers that declare payloads near 2 GiB, over one or a few connections, and force the server to allocate them until the JVM runs out of heap (CVE-2026-108714, CVSS 3.1 7.5, CWE-770). Checked in the source and on Maven Central: the extension is absent at 0.7.2, arrives in 0.7.3 and is unchanged through 0.15.0, the newest release, and nothing on main sets a frame limit, so there is no fixed release.

How to fix

There is no fixed release. Do not use Application.mcpWebSocket: install WebSockets yourself with a maxFrameSize sized to your largest legitimate message, and register the endpoint with Route.mcpWebSocket, which does not install the plugin. Or keep the WebSocket transport off untrusted networks. Pin the first fixed release once it ships.

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

agent-audit-kit scan . --rules AAK-MCP-KOTLINSDK-CVE-2026-108714-001

Limitations

Dependency-level detection on JVM manifests only: build.gradle, build.gradle.kts, gradle/libs.versions.toml and pom.xml. Reports kotlin-sdk-server, kotlin-sdk and their -jvm variants from 0.7.3 where a version resolves, and not kotlin-sdk-core or kotlin-sdk-client, which do not carry the extension. Every version from 0.7.3 is reported, a future fixed one included, until the pin gets a floor. It reads versions, not code, so a server that uses only stdio or SSE, or installs WebSockets with its own maxFrameSize, is reported too. A dynamic version or a version.ref to a catalog outside the scanned tree 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-KOTLINSDK-CVE-2026-108714-001.md: the page then shows that text, with the registry reference appended under it.