CVE-2026-137189: Jupyter MCP Server trusted a spoofable Host header as "localhost", so remote callers could reach its management routes and, in no-auth mode, swap the Jupyter backend (fixed 2.1.3)
Before 2.1.3, Datalayer's Jupyter MCP Server guarded /api/connect, /api/stop and /api/healthz with ManagementRouteSecurityMiddleware, which checked request.url.hostname instead of the real TCP peer. Starlette takes that hostname from the client's Host header, so a remote caller could send Host: localhost and pass. The server binds to all interfaces by default. In --insecure-mcp-noauth mode the caller can replace the active Jupyter backend configuration; in --mcp-token mode the state-changing routes still need the bearer token but the health route stays reachable. Fixed in 2.1.3.
What it is
ManagementRouteSecurityMiddleware in jupyter_mcp_server/server.py decided whether a request was local by reading request.url.hostname, which Starlette derives from the client-supplied Host header, not from the connecting socket.
Because the server listens on all network interfaces by default, any machine that can reach the port can send a localhost Host value and be treated as local.
With --insecure-mcp-noauth, that is enough to call /api/connect and /api/stop and replace the Jupyter backend the server talks to. With --mcp-token, /api/connect and /api/stop still require a valid bearer token; /api/healthz remains reachable.
This is a bypass of the protection added after the earlier management-route issue (CVE-2026-77359). Affected: versions before 2.1.3; NVD published the CVE on 30 November 2026.
How to check
- Run pip show jupyter-mcp-server and check the version is 2.1.3 or later.
- Check whether you start it with --insecure-mcp-noauth and which address it listens on.
How to fix
- Upgrade jupyter-mcp-server to 2.1.3 or later.
- Do not run --insecure-mcp-noauth on a reachable interface; bind to 127.0.0.1 or put it behind an authenticating proxy.
- If an exposed no-auth server was reachable, check which Jupyter runtime it is configured to use and rotate its tokens.
pip show jupyter-mcp-server | grep -i '^version'
ss -ltnp | grep -i python