Junglewise Threat Intelligence

CVE-2026-40864: JupyterHub XSRF protection bypass in HTTP form endpoints

CVE-2026-40864 · Severity: medium · CVSS 5.4 · Published 2026-05-22

Executive brief

JupyterHub, a multi-user platform for Jupyter notebooks, contains a security flaw in its cross-site request forgery (XSRF) protection. An attacker could trick a logged-in user into performing unintended actions, such as starting a server or accepting a shared server connection. While this does not grant the attacker direct access to the user's data, it can be used to manipulate user sessions and server states.

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

Timeline

  • 2026-05-05: disclosed
  • 2026-05-05: advisory
  • 2026-05-05: patched

References

Related threats