Skip to main content

JupyterHub CVE-2026-40864

MEDIUM
Cross-Site Request Forgery (CSRF) (CWE-352)
2026-05-05 https://github.com/jupyterhub/jupyterhub
4.3
CVSS 3.1 · NVD
View

Attack ChainAIDerived

Hypothetical attack flow derived from CVE metadata – not a confirmed exploit chain

  1. Access
    Attacker creates malicious website
  2. Delivery
    Victim (JupyterHub user) visits site while authenticated
  3. Exploit
    Browser sends form POST with Sec-Fetch-Mode: no-cors
  4. Execution
    JupyterHub misclassifies as same-origin and skips XSRF check
  5. Persist
    Spawn request or share acceptance succeeds
  6. Impact
    Attacker 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.

This Month Plan within 30 days. Why: MEDIUM severity (CVSS 4.0-6.9).
Patch available 0.0% exploitation probability (EPSS)

Get an e-mail when this CVE is exploited, patched or re-scored. Free account.

Alert me

AnalysisAIv1 – 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

pypi jupyterhub fix: 5.4.5

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

NVD PRIMARY 4.3 MEDIUM
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

Attack Vector
Network
Attack Complexity
Low
Privileges Required
None
User Interaction
Required
Scope
Unchanged
Confidentiality
None
Integrity
Low
Availability
None

Lifecycle Timeline

1
CVSS changed
Jul 23, 2026 - 11:22 NVD
5.4 (MEDIUM) 4.3 (MEDIUM)

DescriptionNVD

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

EPSS Score
0.0%
Top 97% exploitable
Data Quality
5 sources
Confidence: Medium

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.

SignalValue
Severity MEDIUM
CISA KEV No
Public POC No
EPSS 0.0%
Patch available Yes
Active threat No
Deciding rule
MEDIUM severity (CVSS 4.0-6.9)
What every action level means
Emergency Immediate action required. Criteria: CRITICAL + in CISA KEV (actively exploited) without patch, OR CRITICAL + EPSS > 30% without patch, OR CRITICAL + active threat signals without patch.
Act Now Prioritize within 24-48h. Criteria: in KEV with patch available, OR CRITICAL + public POC, OR HIGH + EPSS > 10%, OR CRITICAL + active threat, OR any CRITICAL severity.
This Week Schedule remediation this week. Criteria: HIGH severity (CVSS 7.0-8.9). Patch within normal change window.
This Month Plan within 30 days. Criteria: MEDIUM severity (CVSS 4.0-6.9), lower exploitation probability. Include in regular patch cycle.
Monitor Track and reassess. Criteria: LOW severity (CVSS 0.1-3.9), minimal exploitation risk. No immediate action needed.

SSVC AssessmentENISA

SSVC Decision· derived
Scheduled
Exploitation· derived
None
System Exposure· derived
Open
Automatable· derived
No
Human Impact· derived
Medium

Priority Score

22
Low Medium High Critical
KEV: 0
EPSS: 0
CVSS: +22
PoC: 0
Weaponized: 0
Threat intel: 0
Gov advisory: 0

Attack Technique

Cross-Site Request Forgery exploits the automatic credential inclusion behavior of web browsers.

Affected Products (CPE)NVD

pkg:pip/jupyterhub

This site uses cookies essential for authentication and security. No tracking or analytics cookies are used. Privacy Policy