Quick answers
- Is CVE-2026-40864 exploited in the wild?
- No. Junglewise Threat Intelligence has no report of CVE-2026-40864 being exploited in the wild.
- How severe is CVE-2026-40864?
- Medium severity, with a CVSS score of 5.4, published 22 May 2026.
- Which products and versions are affected?
- jupyterhub (PyPI) >= 4.1.0, < 5.4.5, ECOSYSTEM:introduced=4.1.0,fixed=5.4.5.
- Is there a fix for CVE-2026-40864?
- Yes. jupyterhub (PyPI): upgrade to 5.4.5 or later. Junglewise finds every place you run it, drafts the upgrade and applies it once you approve.
- How is CVE-2026-40864 attacked?
- It is attacked over the network, in a software library.
- Am I affected by CVE-2026-40864?
- Check whether you run jupyterhub (PyPI) at an affected version. Junglewise does that check for you around the clock: connect your code, cloud and domains, and it matches new vulnerabilities like this one against what you actually run and tells you when one reaches you.
How to fix
- jupyterhub (PyPI): upgrade to 5.4.5 or later
pip install "jupyterhub>=5.4.5"
Technical details
A Cross-Site Request Forgery (CSRF/XSRF) vulnerability exists in JupyterHub due to an improper implementation of origin checks. The application incorrectly identifies requests containing the 'Sec-Fetch-Mode: no-cors' header as same-origin requests, effectively bypassing XSRF validation for HTTP form endpoints like /hub/spawn and /hub/accept-share. An attacker can exploit this by inducing a victim to submit a cross-origin POST request. This allows the attacker to trigger server spawns or force a user to accept a server share from the attacker. The JSON API is not affected. The issue is resolved in version 5.4.5.
Affected products
- jupyterhub jupyterhub >= 4.1.0, < 5.4.5
Identifiers
- CVE-2026-40864
- GHSA-m68r-v472-jgq9
- PYSEC-2026-2189
Timeline
- 2026-05-05: disclosed
- 2026-05-05: advisory
- 2026-05-05: patched
References
- https://api.github.com/users/romain-deperne
- https://github.com/romain-deperne
- https://api.github.com/users/romain-deperne/gists%7B/gist_id%7D
- https://api.github.com/users/romain-deperne/repos
- https://avatars.githubusercontent.com/u/61591917?v=4
- https://api.github.com/users/romain-deperne/events%7B/privacy%7D