JupyterHub CVE-2026-40864
MEDIUMAttack ChainAIDerived
Hypothetical attack flow derived from CVE metadata – not a confirmed exploit chain
-
AccessAttacker creates malicious website
-
DeliveryVictim (JupyterHub user) visits site while authenticated
-
ExploitBrowser sends form POST with Sec-Fetch-Mode: no-cors
-
ExecutionJupyterHub misclassifies as same-origin and skips XSRF check
-
PersistSpawn request or share acceptance succeeds
-
ImpactAttacker triggers server action or gains access to victim's share
Vulnerability Assessment
| Weakness |
CWE
OWASP Top 10:2025
A01:2025 - Broken Access Control
ASVS 5.0
V3 - Web Frontend Security Anti-CSRF tokens, SameSite cookies
MITRE ATT&CK
1 technique across 1 tactic: Initial Access The technique list with ATT&CK links and the kill-chain view is part of the Basic plan and up. |
| Exploitation Conditions | Exploitation requires that the victim be authenticated to JupyterHub at the time they visit the attacker's page. The attack is delivered via HTML form submission with Sec-Fetch-Mode: no-cors, which is the default behavior of standard HTML form elements and cross-origin image/script tags. To trigger server spawning, the attacker does not require authentication to JupyterHub itself, but server spawning is limited by JupyterHub's quota and configuration. To force share acceptance, the attacker must be a JupyterHub user with permission to create shares, and the victim must have share acceptance enabled in their JupyterHub configuration. JSON API endpoints are not vulnerable because they enforce stricter CSRF protection and do not rely on the Sec-Fetch-Mode heuristic. The vulnerability does not affect same-origin requests or requests from authenticated API clients, only cross-origin form submissions. |
| Impact | CVSS 5.4 (AV:N/AC:L/PR:N/UI:R/S:U/C:N/I:L/A:L) indicates network-exploitable, low-complexity CSRF with no privilege requirement but requiring user interaction (victim must visit attacker site while logged into JupyterHub). Exploitation is not automatable - the attack requires social engineering to lure authenticated users to attacker-controlled pages. Impact is limited: integrity and availability are affected (server spawning, forced share acceptance) but confidentiality is not (no data disclosure). The requirement for user interaction and the fact that server spawning alone does not grant access to spawned servers reduces practical risk. However, for JupyterHub instances where share functionality is enabled and users are permitted to share access, the ability to force share acceptance represents a tangible privilege escalation vector. No public exploit code is identified, and the vulnerability is not listed in CISA KEV, suggesting limited real-world exploitation despite being reported by the vendor. The presence of a straightforward mitigation (blocking Sec-Fetch-Mode: no-cors at reverse proxy) and a released patch further reduces priority relative to the base CVSS score. |
| Exploit ScenarioDerived | An attacker creates a malicious webpage containing hidden form elements that POST to victim's JupyterHub instance (e.g., /hub/spawn with parameters to spawn a server). If the victim is authenticated to JupyterHub and visits the attacker's page, the browser silently submits the form with Sec-Fetch-Mode: no-cors. Because JupyterHub incorrectly treats this as same-origin, the XSRF token check is skipped, and the server spawn succeeds. If the victim has share permissions and the attacker is also a JupyterHub user, a more damaging scenario involves forcing the victim to accept a share of the attacker's server, granting the attacker access to the victim's work. |
Get an e-mail when this CVE is exploited, patched or re-scored. Free account.
Alert meAnalysisAIv1 – May 05, 2026
Cross-site request forgery (CSRF) in JupyterHub 4.1.0 through 5.4.4 bypasses XSRF protection for HTTP form endpoints by misclassifying requests with Sec-Fetch-Mode: no-cors as same-origin, allowing unauthenticated attackers to trigger server spawning or, if they are JupyterHub users with share permissions, coerce victims into accepting access shares to the attacker's server. The JSON API is not affected. No active exploitation confirmed, but CVSS 5.4 reflects moderate integrity and availability impact via user interaction.
RemediationAI
Upgrade JupyterHub to version 5.4.5 or later, which corrects the Sec-Fetch-Mode handling in XSRF validation. The upgrade is performed via pip with the command: pip install --upgrade jupyterhub>=5.4.5. For organizations unable to patch immediately, implement the recommended mitigation by configuring a reverse proxy (nginx, Apache, HAProxy, etc.) to drop any requests to JupyterHub endpoints with the Sec-Fetch-Mode: no-cors header, which will block the attack vector while preserving legitimate same-origin form submissions. This mitigation has minimal side effects for normal users but should be validated in a staging environment to ensure no legitimate cross-origin requests are required by custom integrations. The patch reference is https://github.com/jupyterhub/jupyterhub/security/advisories/GHSA-m68r-v472-jgq9.
Affected Packages
Source: OSV (Open Source Vulnerabilities)
Affects your stack
Affects 1 package in pypi
Checking this CVE against your own stacks and servers is part of the Basic plan and up.
Technical ContextAI · show details
JupyterHub implements XSRF protection via token validation on state-changing HTTP form endpoints like /hub/spawn and /hub/accept-share. The vulnerability stems from CWE-352 (Cross-Site Request Forgery) introduced in version 4.1.0, where the XSRF check was modified to incorrectly treat cross-origin requests bearing Sec-Fetch-Mode: no-cors as same-origin requests. The Sec-Fetch-Mode header is part of the Fetch metadata request headers specification and should signal no-cors mode (used by HTML forms, image tags, etc.) as explicitly cross-origin. By mishandling this signal, JupyterHub allowed form-based POST requests from attacker-controlled sites to bypass token validation. The vulnerability affects Python package jupyterhub (CPE: pkg:pip/jupyterhub) versions 4.1.0 through 5.4.4.
Know when the next one hits your stack
- Watch products and get an email when something new is published
- Check this CVE against your own stack and servers
- Exploit and PoC references, threat intelligence from 22 sources
No credit card · 7-day full trial
Severity by source
AV:N/AC:L/PR:N/UI:R/S:U/C:N/I:L/A:N
Primary rating from NVD · only source for this CVE.
CVSS VectorNVD
Lifecycle Timeline
1DescriptionNVD
Summary
JupyterHub'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.
Patches
Upgrade to JupyterHub 5.4.5.
Mitigations
If a reverse proxy is in use, drop requests to JupyterHub with Sec-Fetch-Mode: no-cors.
Threat Intelligence Overview
How this decision was reached
The engine reads each signal below and applies a fixed list of rules from top to bottom. The first rule that matches sets the recommended action – like a statement, every line is shown.
What every action level means
SSVC AssessmentENISA
Priority Score
Attack Technique
Cross-Site Request Forgery exploits the automatic credential inclusion behavior of web browsers.
NVD
CVE.org
EPSS
GitHub
VulDB
Exploit-DB