Critical Bypass Vulnerability Discovered in Jupyter MCP Server
A significant security vulnerability has been identified in the Jupyter MCP Server, which could allow attackers to bypass critical security measures. This flaw, detailed in the advisory for CVE-2026-137189, specifically affects the middleware that checks the hostname of requests before granting access to sensitive management routes. The implications of this vulnerability are serious, as it could lead to unauthorized access and manipulation of server configurations.
The vulnerability arises from the way the Jupyter MCP Server processes the `Host` header in incoming requests. The fix for a previous vulnerability (CVE-2026-77359) introduced a middleware that checks if the `request.url.hostname` is set to `localhost`, `127.0.0.1`, or `::1` before allowing access to the `/api/connect`, `/api/stop`, and `/api/healthz` routes. However, this check relies solely on the client-supplied `Host` header, which can be easily spoofed. An attacker can send a request with a forged `Host: localhost` header, allowing them to bypass the security check entirely.
Technical analysis reveals that the middleware does not reference the actual TCP peer address, which means that any request with a manipulated `Host` header can gain access to the management routes. This is particularly concerning because the server binds to `0.0.0.0` by default, making it accessible from the network, not just localhost. As a result, an attacker could potentially exploit this vulnerability to execute commands on the server, especially in the `--insecure-mcp-noauth` mode, which is not recommended for production use.
The operational impact of this vulnerability is significant. In the insecure mode, an attacker could hijack the server's configuration by sending a crafted payload through the `/api/connect` endpoint. This could lead to unauthorized connections to malicious infrastructure, posing a severe risk to the integrity and confidentiality of the server's operations. Although the secure mode (`--mcp-token`) still requires a valid bearer token for certain routes, the fact that the `/api/healthz` endpoint can be accessed without proper authentication in this mode indicates a potential information disclosure risk.
The advisory highlights that existing regression tests do not account for this specific bypass mechanism, which could allow the vulnerability to persist undetected. The lack of a test for a forged `Host: localhost` header from a non-local source underscores the need for improved testing practices to ensure that such vulnerabilities are identified and mitigated.
In light of this discovery, it is crucial for organizations using the Jupyter MCP Server to take immediate action. Users are advised to upgrade to the latest patched versions of the software as soon as they become available. Additionally, organizations should review their configurations to ensure that they are not operating in insecure modes that expose them to this vulnerability. Implementing network-level protections, such as firewalls that restrict access to management routes, can also help mitigate the risk of exploitation.
As the situation develops, it will be important to monitor for updates from the Jupyter project regarding the release of patched versions and any additional guidance on securing the MCP Server against this vulnerability. The discovery of this bypass highlights the ongoing challenges in maintaining secure software and the need for continuous vigilance in the cybersecurity landscape.
Sources reviewed