Standalone streamable-http mode in datalayer/jupyter-mcp-server requires MCP_TOKEN for /mcp, but the custom management routes mounted on the same application do not enforce that token. An unauthenticated network caller can invoke PUT /api/connect, choose the Jupyter backend URL and token fields, reset the server context, and make the MCP server start a kernel client against attacker-controlled infrastructure. The same missing authentication affects the state-changing DELETE /api/stop route.
The intended authentication boundary is documented in the security guide and enforced during startup:
docs/docs/reference/security/index.mdx:15
All MCP endpoints require Bearer token authentication.
docs/docs/reference/security/index.mdx:25
Starting with version 1.0.0, MCP client authentication is required for the streamable-http transport.
The CLI enforces that boundary for the MCP endpoint:
# jupyter_mcp_server/CLI.py:203-209
if transport == "streamable-http" and not mcp_token and not insecure_mcp_noauth:
raise click.UsageError(
"streamable-http transport requires MCP client authentication. "
"Set --mcp-token / MCP_TOKEN, or pass --insecure-mcp-noauth to "
"explicitly allow unauthenticated access."
)
# jupyter_mcp_server/CLI.py:285-290
if transport == "streamable-http":
if mcp_token:
from jupyter_mcp_server.server import RuntimeTokenVerifier
mcp._token_verifier = RuntimeTokenVerifier(mcp_token)
logger.info("MCP endpoint token authentication enabled (using MCP_TOKEN)")
The vulnerable route is jupyter_mcp_server/server.py:143-187:
@mcp.custom_route("/api/connect", ["PUT"])
async def connect(request: Request):
data = await request.json()
document_runtime = DocumentRuntime(**data)
set_config(
provider=document_runtime.provider,
runtime_url=document_runtime.runtime_url,
runtime_id=document_runtime.runtime_id,...
1.0.3Exploitability
AV:NAC:LAT:PPR:NUI:PVulnerable System
VC:LVI:HVA:LSubsequent System
SC:HSI:HSA:L7.3/CVSS:4.0/AV:N/AC:L/AT:P/PR:N/UI:P/VC:L/VI:H/VA:L/SC:H/SI:H/SA:LAuthentication