Dev.to Security πŸ” Cybersecurity πŸ‘ 1 πŸ“– 1 min read

Jupyter MCP Server Host-Header Spoof Bypasses Localhost Fix

TL;DR: Upgrade jupyter-mcp-server to 2.1.3 or validate the actual TCP peer address instead of the client-supplied Host header to prevent unauthenticated management-route hijacking. The root cause is a trust-boundary vi

TL;DR: Upgrade jupyter-mcp-server to 2.1.3 or validate the actual TCP peer address instead of the client-supplied Host header to prevent unauthenticated management-route hijacking.

The root cause is a trust-boundary violation in ManagementRouteSecurityMiddleware.dispatch and _is_local_hostname at jupyter_mcp_server/server.py:105-169. The middleware performs a pure string comparison against request.url.hostname, which Starlette derives from the client-supplied Host header whenever one is present. It never references request.client or scope["client"]. A remote caller can supply Host: localhost to pass the check regardless of the actual TCP peer address. Because the server binds to 0.0.0.0 by default, this is reachable from the network, not just localhost. In --insecure-mcp-noauth mode, the caller can replace the active Jupyter backend configuration. In --mcp-token mode, state-changing routes still require a bearer token, but /api/healthz remains reachable via the spoof.

Verified Key Facts

Metric / Signal Finding
CVE identifier CVE-2026-137189 (GHSA-f8rf-rcrx-h6r9)
CVSS v4.0 score 9.3 Critical
Affected versions jupyter-mcp-server < 2.1.3
Patched version 2.1.3
EPSS exploitation probability 0.442%
CISA SSVC exploitation status Public exploit code

Inside the Full Technical Dispatch

  • Threat Model & Attack Surface Matrix
  • Why Naive Prompt Filters Fail
  • Defense-in-Depth & Sandbox Isolation Architecture
  • Runnable Guardrail Policy / Verification Code
  • Operational Tradeoffs & False-Positive Budget

Read the full analysis, runnable configurations, benchmark tables, and primary source citations on Pyvren.

Originally published on Pyvren by Hamdi Soudani.

πŸ“° Read the original article on Dev.to Security

Originally published by Dev.to Security. Aggregated on AIWithGhost for educational purposes β€” full credit and traffic to the original publisher.