CVE-2026-40864 JupyterHub: Cross-origin form POSTs bypass XSRF

Medium 5.4 Published Updated

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.

PackageAffectedFixed in
jupyterhub BitnamiFrom 4.1.05.4.5
jupyterhub PyPIFrom 4.1.05.4.5
jupyterhub PyPIFrom 4.1.05.4.5
jupyterhub PyPIFrom 4.1.05.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.

Sources

Also known as BIT-jupyterhub-2026-40864, DEBIAN-CVE-2026-40864, GHSA-m68r-v472-jgq9, PYSEC-2026-2189, UBUNTU-CVE-2026-40864.

Is CVE-2026-40864 in your software?

Upload an SBOM and sbomify checks it against every vulnerability here, every day.

Check your SBOMs for free