Skip to content
Heist/ feed
Back to feed
Medium

JupyterHub: Cross-origin form POSTs bypass XSRF

Type: advisorySources: OSV

JupyterHub is software that allows users to create a multi-user server for Jupyter notebooks. In versions 4.1.0 through 5.4.4, XSRF protection (updated in 4.1.0) inappropriately treated requests with Sec-Fetch-Mode: no-cors as same-origin requests, bypassing XSRF checks. The JSON API is not affected, only HTTP form endpoints, such as /hub/spawn and /hub/accept-share, meaning attackers could trigger server spawn (but not access the server) and if the attacker is a JupyterHub user permitted to share access to their server, cause a user to accept a share and have access to the attacker's server. This issue has been fixed in version 5.4.5. If developers are unable to immediately upgrade, they can temporarily mitigate this issue by dropping requests to JupyterHub with Sec-Fetch-Mode: no-cors if they are using a reverse proxy.

Products
Not specified
Affected versions
Not specified
Fixed versions
Not specified
CVEs
CVE-2026-40864
Confirmed fixed CVEs
Not specified
Updated in this feed
6 Nov 2026, 09:11 UTC · Revision 1

Source evidence

JupyterHub: Cross-origin form POSTs bypass XSRF

core-osv · Original source

Published 22 May 2026, 20:13 UTC

JupyterHub is software that allows users to create a multi-user server for Jupyter notebooks. In versions 4.1.0 through 5.4.4, XSRF protection (updated in 4.1.0) inappropriately treated requests with Sec-Fetch-Mode: no-cors as same-origin requests, bypassing XSRF checks. The JSON API is not affected, only HTTP form endpoints, such as /hub/spawn and /hub/accept-share, meaning attackers could trigger server spawn (but not access the server) and if the attacker is a JupyterHub user permitted to share access to their server, cause a user to accept a share and have access to the attacker's server. This issue has been fixed in version 5.4.5. If developers are unable to immediately upgrade, they can temporarily mitigate this issue by dropping requests to JupyterHub with Sec-Fetch-Mode: no-cors if they are using a reverse proxy.

osv:CVE-2026-40864
Complete source record
{
  "id": "fa7fdede977c29f34757bae8c1d8ae5412b2520d51eadec80da7bbd0703a4478",
  "url": "https://osv.dev/vulnerability/CVE-2026-40864",
  "method": "structured",
  "payload": {
    "kind": "advisory",
    "title": "JupyterHub: Cross-origin form POSTs bypass XSRF",
    "summary": "JupyterHub is software that allows users to create a multi-user server for Jupyter notebooks. In versions 4.1.0 through 5.4.4, XSRF protection (updated in 4.1.0) inappropriately treated requests with Sec-Fetch-Mode: no-cors as same-origin requests, bypassing XSRF checks. The JSON API is not affected, only HTTP form endpoints, such as /hub/spawn and /hub/accept-share, meaning attackers could trigger server spawn (but not access the server) and if the attacker is a JupyterHub user permitted to share access to their server, cause a user to accept a share and have access to the attacker's server. This issue has been fixed in version 5.4.5. If developers are unable to immediately upgrade, they can temporarily mitigate this issue by dropping requests to JupyterHub with Sec-Fetch-Mode: no-cors if they are using a reverse proxy.",
    "evidence": "osv:CVE-2026-40864",
    "products": [],
    "severity": "medium",
    "structured": {
      "id": "CVE-2026-40864",
      "aliases": [
        "BIT-jupyterhub-2026-40864",
        "CVE-2026-40864",
        "GHSA-m68r-v472-jgq9",
        "PYSEC-2026-2189"
      ],
      "metrics": [
        {
          "type": "CVSS_V3",
          "score": "CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:N/I:L/A:L"
        }
      ],
      "affected": [
        {
          "ranges": [
            {
              "repo": "https://github.com/jupyterhub/jupyterhub",
              "type": "GIT",
              "events": [
                {
                  "introduced": "984a67932ffcd2a1024c7f23636f7e34e7df33ac"
                },
                {
                  "fixed": "edfb81dba2d45e9a243de4c4b65c3e94ca53932f"
                },
                {
                  "fixed": "9c5ec277d3cda5a59de2d8c8117efa77bd941127"
                }
              ],
              "database_specific": {
                "extracted_events": [
                  {
                    "cpe": "cpe:2.3:a:jupyter:jupyterhub:*:*:*:*:*:*:*:*",
                    "range": [
                      {
                        "introduced": "4.1.0"
                      },
                      {
                        "fixed": "5.4.5"
                      }
                    ],
                    "source": "CPE_RANGE"
                  },
                  {
                    "range": [
                      {
                        "fixed": "9c5ec277d3cda5a59de2d8c8117efa77bd941127"
                      }
                    ],
                    "source": "REFERENCES_COMMIT"
                  }
                ]
              }
            }
          ],
          "database_specific": {
            "source": "https://storage.googleapis.com/cve-osv-conversion/osv-output/CVE-2026-40864.json"
          }
        }
      ],
      "modified": "2026-10-28T02:30:46.833166662Z",
      "provider": "osv",
      "references": [
        "https://github.com/CVEProject/cvelistV5/tree/main/cves/2026/40xxx/CVE-2026-40864.json",
        "https://github.com/jupyterhub/jupyterhub/security/advisories/GHSA-m68r-v472-jgq9",
        "https://nvd.nist.gov/vuln/detail/CVE-2026-40864",
        "https://github.com/jupyterhub/jupyterhub/commit/9c5ec277d3cda5a59de2d8c8117efa77bd941127"
      ],
      "provider_metadata": {
        "cwe_ids": [
          "CWE-352"
        ],
        "cna_assigner": "GitHub_M",
        "osv_generated_from": "https://github.com/CVEProject/cvelistV5/tree/main/cves/2026/40xxx/CVE-2026-40864.json"
      }
    },
    "related_cves": [
      {
        "value": "CVE-2026-40864",
        "evidence": "/id"
      }
    ],
    "security_relevant": true,
    "severity_evidence": "/severity/0/score"
  },
  "source_id": "core-osv",
  "document_id": 515060,
  "published_at": "2026-05-22T20:13:05.262+00:00"
}