CVE-2026-40864: Jupyterhub JupyterHub Has Cross-origin Form POSTs Vulnerability
MODERATECVE-2026-40864 is a MODERATE (CVSS 5.4) jupyterhub has cross-origin form posts vulnerability (CWE-352: Cross-Site Request Forgery (CSRF)) affecting Jupyterhub libraries in the PyPI ecosystem. The issue involves jupyterhub has cross-origin form posts bypass xsrf (cwe-352). Remediation is available by upgrading affected packages to version 5.4.5.
CVE-2026-40864 at a Glance
Security Impact
CVSS: 5.4
The security impact metrics below are parsed directly from the CVSS v3.1 vector string (CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:N/I:L/A:L).
How to Fix CVE-2026-40864
To remediate this vulnerability, upgrade all affected Jupyterhub dependencies to a patched release. Both direct and transitive dependencies should be checked, as frameworks or security libraries may pull in vulnerable versions transitively.
pip install jupyterhub>=5.4.5
Run the following command in your project directory to verify that all resolved dependencies use the patched release:
pip show jupyterhub
How to Check if You Are Affected
To determine whether your Python environment is affected by CVE-2026-40864, inspect your installed packages using pip:
pip show jupyterhub
Analyze the terminal output to locate any version of Jupyterhub in your dependency tree. If any resolved version matches the vulnerable ranges listed in the table below (for example, versions earlier than 5.4.5), your application is affected.
Note: The pip show jupyterhub command checks currently installed packages in your active Python environment.
Technical Details
Vulnerability Mechanism & Technical Analysis
This vulnerability is classified under CWE-352: Cross-Site Request Forgery (CSRF), where the web application does not, or cannot, sufficiently verify whether a request was intentionally provided by the user who sent the request, which could have originated from an unauthorized actor. In Jupyterhub, 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
CVE-2026-40864 Affected Jupyterhub Versions
1 component(s)| Product / Package | Ecosystem | Affected Versions | Fixed Version |
|---|---|---|---|
|
jupyterhub
|
PyPI |
≥ 4.1.0
< 5.4.5
|
5.4.5
|
References
Frequently Asked Questions
What is CVE-2026-40864?
Which Jupyterhub versions are affected?
What version fixes CVE-2026-40864?
Is jupyterhub affected?
What is the CVSS score of CVE-2026-40864?
What CWE is associated with CVE-2026-40864?
How can I check PyPI dependencies for CVE-2026-40864?
Machine-readable OSV JSON
OSV v1.5 Schema
{
"schema_version" : "1.4.0",
"id" : "GHSA-m68r-v472-jgq9",
"modified" : "2026-06-08T23:20:50Z",
"published" : "2026-05-05T18:10:58Z",
"aliases" : [ "CVE-2026-40864" ],
"summary" : "JupyterHub has cross-origin form POSTs bypass XSRF (CWE-352)",
"details" : "## Summary\n\nJupyterHub's XSRF protection (updated in 4.1.0) inappropriately treated requests with `Sec-Fetch-Mode: no-cors` as same-origin requests, which they are not, 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.\n\n## Patches\n\nUpgrade to JupyterHub 5.4.5.\n\n## Mitigations\n\nIf a reverse proxy is in use, drop requests to JupyterHub with `Sec-Fetch-Mode: no-cors`.",
"severity" : [ {
"type" : "CVSS_V3",
"score" : "CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:N/I:L/A:L"
} ],
"affected" : [ {
"package" : {
"ecosystem" : "PyPI",
"name" : "jupyterhub"
},
"ranges" : [ {
"type" : "ECOSYSTEM",
"events" : [ {
"introduced" : "4.1.0"
}, {
"fixed" : "5.4.5"
} ]
} ]
} ],
"references" : [ {
"type" : "WEB",
"url" : "https://github.com/jupyterhub/jupyterhub/security/advisories/GHSA-m68r-v472-jgq9"
}, {
"type" : "ADVISORY",
"url" : "https://nvd.nist.gov/vuln/detail/CVE-2026-40864"
}, {
"type" : "WEB",
"url" : "https://github.com/jupyterhub/jupyterhub/commit/9c5ec277d3cda5a59de2d8c8117efa77bd941127"
}, {
"type" : "PACKAGE",
"url" : "https://github.com/jupyterhub/jupyterhub"
} ],
"database_specific" : {
"cwe_ids" : [ "CWE-352" ],
"severity" : "MODERATE",
"github_reviewed" : true,
"github_reviewed_at" : "2026-05-05T18:10:58Z",
"nvd_published_at" : "2026-05-22T21:16:43Z"
}
}