VulnWatch by ve1ve2
high 7.3 EPSS 0.51%

GHSA-24pw-rf5p-mgp7 / CVE-2026-77318: Jupyter MCP Server: Unauthenticated management routes can hijack the Jupyter backend in standalone HTTP mode

Source:
GitHub Security Advisories
Published:
Fetched:
Updated:
Affects:
jupyter-mcp-server

https://github.com/advisories/GHSA-24pw-rf5p-mgp7 ↗

ghsapipCWE-306

Jupyter MCP Server: Unauthenticated management routes can hijack the Jupyter backend in standalone HTTP mode 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: ```text 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: ```python # 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." ) ``` ```python # 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`: ```python @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, runtime_token=document_runtime.runtime_token, document_url=document_runtime.document_url, document_id=document_runtime.document_id, document_token=document_runtime.document_token, allowed_jupyter_tools=document_runtime.allowed_jupyter_tools or "notebook_run-all-cells,notebook_get-selected-cell" ) ServerContext.reset() try: __start_kernel() return JSONResponse({"success": True}) ``` `/api/stop` is also unauthenticated and state-changing: ```python # jupyter_mcp_server/server.py:190-199 @mcp.custom_route("/api/stop", ["DELETE"]) async def stop(request: Request): try: current_notebook = notebook_manager.get_current_notebook() or "default" if current_notebook in notebook_manager: notebook_manager.remove_notebook(current_notebook) return JSONResponse({"success": True}) ``` ## Proof of concept Run the affected version: ```bash git clone https://github.com/datalayer/jupyter-mcp-server Affected packages: pip:jupyter-mcp-server Patched: jupyter-mcp-server 1.0.3

Linked vulnerabilities (2)

CVSS:4.0/AV:N/AC:L/AT:P/PR:N/UI:P/VC:L/VI:H/VA:L/SC:H/SI:H/SA:L

Jupyter MCP Server: Unauthenticated management routes can hijack the Jupyter backend in standalone HTTP mode

CWE: CWE-306Aliases: CVE-2026-77318
CVE-2026-77318 high 7.3 EPSS 0.51% (p44) NVDCVE.orgGHSA
CVSS:4.0/AV:N/AC:L/AT:P/PR:N/UI:P/VC:L/VI:H/VA:L/SC:H/SI:H/SA:L/E:X/CR:X/IR:X/AR:X/MAV:X/MAC:X/MAT:X/MPR:X/MUI:X/MVC:X/MVI:X/MVA:X/MSC:X/MSI:X/MSA:X/S:X/AU:X/R:X/V:X/RE:X/U:X

Jupyter MCP Server: Unauthenticated management routes can hijack the Jupyter backend in standalone HTTP mode

CWE: CWE-306Aliases: GHSA-24pw-rf5p-mgp7NVD: Received

Also reported by (1)