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

Published May 5, 2026
·
Updated

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.

Other sources

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.

MITRE

Affected Software

2 affected componentsFixes available
pip/jupyterhub>=4.1.0<5.4.5
5.4.5
jupyter JupyterHub>=4.1.0<5.4.5

Remediation

Recommended actions to resolve this vulnerability, in priority order.

  1. Upgrade

    Upgrade pip/jupyterhub to a version that resolves this vulnerability.

    Fixed in 5.4.5
  2. Upgrade

    Upgrade JupyterHub to a version that resolves this vulnerability.

    Fixed in 5.4.5
  3. Compensating control

    If a reverse proxy is in use, drop requests to JupyterHub that contain the header Sec-Fetch-Mode: no-cors. This is a temporary mitigation for versions 4.1.0 through 5.4.4 where XSRF protection inappropriately treats Sec-Fetch-Mode: no-cors as same-origin and bypasses XSRF checks.

Event History

May 5, 2026
Advisory Published
via GitHub·06:10 PM
Data Sourced
via GitHub·06:10 PM
DescriptionSeverityWeaknessAffected Software
May 22, 2026
CVE Published
via MITRE·08:13 PM
Data Sourced
via MITRE·08:13 PM
DescriptionSeverityWeakness
Data Sourced
via NVD·09:16 PM
RemedyDescriptionSeverityWeaknessAffected Software
Free Weekly Intel

Don't miss critical vulnerabilities

Join thousands of security professionals who receive our weekly digest of trending CVEs, zero-days, and exploited vulnerabilities.

No spam. Unsubscribe anytime.

Frequently Asked Questions

1

What is the severity of CVE-2026-40864?

CVE-2026-40864 has been classified as a high severity vulnerability due to its potential to bypass XSRF protections.

2

How do I fix CVE-2026-40864?

To fix CVE-2026-40864, you should upgrade to JupyterHub version 5.4.5 or later.

3

Which JupyterHub versions are affected by CVE-2026-40864?

JupyterHub versions from 4.1.0 to 5.4.4 are affected by CVE-2026-40864.

4

What endpoints are impacted by CVE-2026-40864?

CVE-2026-40864 affects HTTP form endpoints such as /hub/spawn and /hub/accept-share.

5

Does CVE-2026-40864 affect the JSON API of JupyterHub?

No, CVE-2026-40864 does not affect the JSON API of JupyterHub, only the HTTP form endpoints.

Contact

SecAlerts Pty Ltd.
132 Wickham Terrace
Fortitude Valley,
QLD 4006, Australia
info@secalerts.co
By using SecAlerts services, you agree to our services end-user license agreement. This website is safeguarded by reCAPTCHA and governed by the Google Privacy Policy and Terms of Service. All names, logos, and brands of products are owned by their respective owners, and any usage of these names, logos, and brands for identification purposes only does not imply endorsement. If you possess any content that requires removal, please get in touch with us.
© 2026 SecAlerts Pty Ltd.
ABN: 70 645 966 203, ACN: 645 966 203