CVE-2026-77359: Jupyter MCP Server: Browser DNS rebinding can hijack the Jupyter backend through management routes
Standalone streamable-http mode in datalayer/jupyter-mcp-server rejects forged Host and Origin headers on /mcp, but custom management routes mounted on the same application do not get the same browser-origin protection. A malicious website can keep an attacker origin while its hostname resolves to 127.0.0.1 or a private target address, then send PUT /api/connect to replace the MCP server’s active Jupyter backend. The route accepts the browser-shaped request and makes the server start a kernel client against attacker-controlled infrastructure.
The protected /mcp endpoint shows the intended browser-origin boundary. With MCP_TOKEN configured, /mcp rejects forged browser headers:
POST /mcp with Authorization: Bearer SCAN_MCP_TOKEN
Host: attacker.example:8142
Origin: http://attacker.example:8142
HTTP 421 Invalid Host header
The vulnerable route is jupyter_mcp_server/server.py:143-187. It parses caller JSON, updates the active Jupyter backend configuration, resets ServerContext, and starts the kernel without applying the /mcp Host/Origin rejection to the custom route:
@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 state-changing and accepts the same browser-origin route shape:
References
- github.com/advisories/GHSA-9x8x-crjq-g64h
- github.com/datalayer/jupyter-mcp-server/commit/c2e98fca2df1bbd608451ec416aaa38a4
- github.com/datalayer/jupyter-mcp-server/pull/262
- github.com/datalayer/jupyter-mcp-server/releases/tag/v1.0.3
- github.com/datalayer/jupyter-mcp-server/security/advisories/GHSA-9x8x-crjq-g64h
- nvd.nist.gov/vuln/detail/CVE-2026-77359
Code Behaviors & Features
Detect and mitigate CVE-2026-77359 with GitLab Dependency Scanning
Secure your software supply chain by verifying that all open source dependencies used in your projects contain no disclosed vulnerabilities. Dependency Scanning using SBOM also detects vulnerabilities from proprietary advisories that this site does not include. Learn more about Dependency Scanning using SBOM →