CVE-2026-40864 JupyterHub: Cross-origin form POSTs bypass XSRF
Attackers can bypass XSRF protections to trigger server spawns or force users to accept shared server access via cross-origin form POSTs.
- Exploited in the wild
- Not known
- Login needed
- Not needed
- Attackable
- Over the internet
- Victim action needed
- A user has to click or open something
- Fix
- Available
What is CVE-2026-40864?
CVE-2026-40864 is a medium-severity vulnerability in jupyterhub, published on 22 May 2026. An attacker can exploit it over the internet without logging in, and only if a user opens a file or follows a link.
Official description
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.
Weakness: CWE-352
Which versions are affected by CVE-2026-40864?
4 open source packages ship an affected version, including jupyterhub. It affects 1 product.
| Package | Affected | Fixed in |
|---|---|---|
jupyterhub Bitnami | From 4.1.0 | 5.4.5 |
jupyterhub PyPI | From 4.1.0 | 5.4.5 |
jupyterhub PyPI | From 4.1.0 | 5.4.5 |
jupyterhub PyPI | From 4.1.0 | 5.4.5 |
Products include Jupyter Jupyterhub.
How do I fix CVE-2026-40864?
Upgrade jupyterhub to 5.4.5 or later.
Is CVE-2026-40864 being exploited?
There is no known exploitation of CVE-2026-40864 in the wild and no public exploit code.
Public exploit code: 1 proofs of concept on GitHub.
Other vulnerabilities in jupyterhub
- CVE-2024-28233 XSS in JupyterHub via Self-XSS leveraged by Cookie Tossing
- CVE-2024-41942 JupyterHub has a privilege escalation vulnerability with the `admin:users` scope
- CVE-2019-10255 Open Redirect vulnerability in jupyterhub and notebook
- CVE-2026-33709 JupyterHub has an Open Redirect Vulnerability
- CVE-2020-36191 Cross-Site Request Forgery in JupyterHub
Sources
Also known as BIT-jupyterhub-2026-40864, DEBIAN-CVE-2026-40864, GHSA-m68r-v472-jgq9, PYSEC-2026-2189, UBUNTU-CVE-2026-40864.