CVE-2026-40934: jupyter-server: auth cookie survives password reset
GHSA-5mrq-x3x5-8v8fMEDIUMPoC AVAILABLEJupyter Server versions up to 2.17.0 permanently store the cookie signing secret on disk and never rotate it, meaning authentication cookies captured before a password change remain cryptographically valid afterward — credential rotation does not revoke active sessions. With 1,862 downstream dependents, this flaw is embedded across a large footprint of data science and AI development infrastructure, where Jupyter typically serves as the central control plane for training pipelines, model development, and credential-laden notebooks. Exploitation probability is low (EPSS 0.065%, no public exploit, not in KEV), but the impact of a successful attack is severe: an adversary who captures a session cookie before a password reset can silently re-enter the environment after the team believes the incident was contained. Upgrade to jupyter-server 2.18.0 immediately; if patching is blocked, delete `~/.local/share/jupyter/runtime/jupyter_cookie_secret` and restart the server to force secret regeneration.
What is the risk?
Medium severity (CVSS 6.8, AV:N/AC:H/PR:L) with elevated contextual risk in enterprise AI/ML environments. The high attack complexity reflects the prerequisite of prior session capture, but once a cookie is obtained, the persistent access mechanism is trivially exploitable. The critical concern is that this vulnerability silently undermines the primary incident response control for credential compromise — teams executing standard playbooks (force password reset) will believe access has been revoked when it has not. Risk is highest in shared JupyterHub environments, cloud-based AI development platforms, and multi-tenant data science infrastructure where session revocation is a critical security guarantee.
How does the attack unfold?
What systems are affected?
| Package | Ecosystem | Vulnerable Range | Patched |
|---|---|---|---|
| Jupyter | pip | <= 2.17.0 | 2.18.0 |
Do you use Jupyter? You're affected.
How severe is it?
What is the attack surface?
What should I do?
5 stepsPatch: Upgrade jupyter-server to 2.18.0+ which regenerates the cookie secret on password change.
Immediate workaround:
rm ~/.local/share/jupyter/runtime/jupyter_cookie_secretfollowed by server restart to immediately invalidate all active sessions.Detection: Review server access logs for sessions persisting across known password reset timestamps; any authenticated request using a cookie issued before a password change event is suspicious.
Architecture hardening: Place Jupyter behind JupyterHub or a reverse proxy with independent session management; restrict Jupyter access to localhost or VPN to reduce cookie interception surface.
For containerized environments: restart Jupyter containers after any suspected credential compromise to force secret regeneration.
What does CISA's SSVC say?
Source: CISA Vulnrichment (SSVC v2.0). Decision based on the CISA Coordinator decision tree.
How is it classified?
Which compliance frameworks are affected?
This CVE is relevant to:
Frequently Asked Questions
What is CVE-2026-40934?
Jupyter Server versions up to 2.17.0 permanently store the cookie signing secret on disk and never rotate it, meaning authentication cookies captured before a password change remain cryptographically valid afterward — credential rotation does not revoke active sessions. With 1,862 downstream dependents, this flaw is embedded across a large footprint of data science and AI development infrastructure, where Jupyter typically serves as the central control plane for training pipelines, model development, and credential-laden notebooks. Exploitation probability is low (EPSS 0.065%, no public exploit, not in KEV), but the impact of a successful attack is severe: an adversary who captures a session cookie before a password reset can silently re-enter the environment after the team believes the incident was contained. Upgrade to jupyter-server 2.18.0 immediately; if patching is blocked, delete `~/.local/share/jupyter/runtime/jupyter_cookie_secret` and restart the server to force secret regeneration.
Is CVE-2026-40934 actively exploited?
Proof-of-concept exploit code is publicly available for CVE-2026-40934, increasing the risk of exploitation.
How to fix CVE-2026-40934?
1. Patch: Upgrade jupyter-server to 2.18.0+ which regenerates the cookie secret on password change. 2. Immediate workaround: `rm ~/.local/share/jupyter/runtime/jupyter_cookie_secret` followed by server restart to immediately invalidate all active sessions. 3. Detection: Review server access logs for sessions persisting across known password reset timestamps; any authenticated request using a cookie issued before a password change event is suspicious. 4. Architecture hardening: Place Jupyter behind JupyterHub or a reverse proxy with independent session management; restrict Jupyter access to localhost or VPN to reduce cookie interception surface. 5. For containerized environments: restart Jupyter containers after any suspected credential compromise to force secret regeneration.
What systems are affected by CVE-2026-40934?
This vulnerability affects the following AI/ML architecture patterns: Jupyter notebook environments, ML development pipelines, Multi-user data science platforms, Training pipelines, Containerized AI development environments.
What is the CVSS score for CVE-2026-40934?
CVE-2026-40934 has a CVSS v3.1 base score of 6.8 (MEDIUM). The EPSS exploitation probability is 0.33%.
What is the AI security impact?
Affected AI Architectures
MITRE ATLAS Techniques
AML.T0012Valid AccountsAML.T0025Exfiltration via Cyber MeansAML.T0055Unsecured CredentialsAML.T0091.000Application Access TokenCompliance Controls Affected
What are the technical details?
Original Advisory
## Summary A persistent cookie secret vulnerability allows authenticated users to maintain indefinite access even after password changes. The cookie secret used to sign authentication cookies is stored in a permanent file (`~/.local/share/jupyter/runtime/jupyter_cookie_secret`) that is never automatically rotated or cleared, allowing stolen or compromised cookies to remain valid indefinitely regardless of password resets. ## PoC - Start a Jupyter server with password authentication: `jupyter server password`, `jupyter server` - Log in with the password and capture the authentication cookie (e.g., just login with a browser). - Change the password to revoke access: `jupyter server password` - Restart the server - Use the old stolen cookie => remains valid and provides full authenticated access. ## Impact - All jupyter-server deployments using password authentication where security incidents may occur - Multi-user systems where one user's compromised session should be revocable by administrators - Shared or public-facing Jupyter servers where credential rotation is a security requirement - Any deployment where password changes are expected to revoke existing sessions ## Patches Jupyter Server 2.18+ ## Workaround ```bash rm ~/.local/share/jupyter/runtime/jupyter_cookie_secret # Then restart the server ```
Exploitation Scenario
An adversary targeting an AI research team steals a data scientist's Jupyter authentication cookie via a phishing-delivered browser extension, XSS vulnerability in rendered notebook HTML output, or network interception on a shared Wi-Fi network. The security team detects the compromise and resets the Jupyter password within hours, logging the incident as contained. Because the cookie signing secret in `~/.local/share/jupyter/runtime/jupyter_cookie_secret` is never rotated, the adversary's captured cookie remains valid. Days later, the adversary silently re-enters the Jupyter environment, accesses proprietary model training notebooks, exfiltrates cloud API credentials stored as environment variables, and modifies a training pipeline script to embed a backdoor in the next model version — the entire post-remediation intrusion goes undetected because the organization believes access was revoked.
Weaknesses (CWE)
CWE-613 — Insufficient Session Expiration: This entry has been deprecated because it was insufficiently clear. Consider CWE-1462 and its descendants.
Source: MITRE CWE corpus.
CVSS Vector
CVSS:3.1/AV:N/AC:H/PR:L/UI:N/S:U/C:H/I:H/A:NReferences
Timeline
Related Vulnerabilities
CVE-2023-2557410.0JupyterHub LTI13: JWT forgery enables full auth bypass
Same package: jupyterCVE-2024-3970010.0JupyterLab extension-template: CI workflow RCE
Same package: jupyterCVE-2026-441809.8Jupyter Enterprise Gateway: root privilege bypass in Kubernetes
Same package: jupyterCVE-2026-235379.1Feast: unauth file write to RCE via /save-document
Same package: jupyterCVE-2026-545279.0jupyterlab-git: stored XSS escalates to full RCE
Same package: jupyter