All vulnerabilities

PyPI

CVE-2026-137189

Jupyter MCP Server: Host-header spoof bypasses the CVE-2026-77359/GHSA-9x8x-crjq-g64h fix

Severity
Critical
Published
30 Nov 2026
Last changed
30 Nov 2026
Added to UpHeron
30 Nov 2026
Fixed in
2.1.3
Weakness
Origin validation error (CWE-346)
Also known as
GHSA-f8rf-rcrx-h6r9
Sources
OSV.dev and GitHub

Description

The fix for CVE-2026-77359/CVE-2026-77318 (GHSA-9x8x-crjq-g64h) added a middleware that checks whether request.url.hostname is localhost/127.0.0.1/::1 before allowing access to the /api/connect, /api/stop, and /api/healthz management routes. That check reads Starlette's parsed URL, which is built from the client-supplied Host header whenever one is present - not from the actual TCP peer address. A single request with a forged Host: localhost header, regardless of where it actually originates, passes the check.

  • jupyter_mcp_server/server.py:105-169 - ManagementRouteSecurityMiddleware.dispatch and _is_local_hostname (lines 110-111) do a pure string comparison against the parsed Host header, never referencing request.client or scope["client"] (confirmed via grep - neither appears anywhere in this file).
From the GitHub Advisory Database, CC BY 4.0. Shortened; the full text is there.

Affected software

SoftwareAffected versions
jupyter-mcp-serverPyPI · osv:PyPI:jupyter-mcp-server
  • Every version before 2.1.3

About jupyter-mcp-server

Weekly downloads (PyPI)
11,829PyPI Stats, 24 Nov 2026

References