What happened
Before 2.1.3 the Jupyter MCP server's ManagementRouteSecurityMiddleware validated request.url.hostname (derived from the Host header) instead of the real TCP peer, permitting a spoofed localhost Host value to bypass access control on /api/connect, /api/stop and /api/healthz. With the default all-interface binding and --insecure-mcp-noauth mode, an unauthenticated remote attacker can replace the active Jupyter backend configuration (CVSS 4.0 9.3, CWE-346, CI/VI/AI all High).
Why it matters
MCP servers are the trust boundary between an LLM agent and the host. A host-header origin-validation flaw that lets a remote caller reassign the Jupyter backend configuration turns an agent's Jupyter MCP tool surface into an unauthenticated host-control / remote-code-execution channel.
Attack vector
ManagementRouteSecurityMiddleware checked request.url.hostname rather than the actual TCP peer before allowing access to /api/connect, /api/stop and /api/healthz; Starlette derives that hostname from the client-supplied Host header, so a remote attacker sends a localhost Host value to pass the check. In --insecure-mcp-noauth mode this allows replacing the active Jupyter backend configuration; the server binds all interfaces by default.
Affected systems
datalayer jupyter-mcp-server < 2.1.3 (fixed in 2.1.3)
Mitigation
Upgrade to v2.1.3 (CWE-346 origin-validation; advisory GHSA-f8rf-rcrx-h6r9).