{"id":"CVE-2026-40934","aliases":["CVE-2026-40934","GHSA-5mrq-x3x5-8v8f","PYSEC-2026-69"],"related":[],"kind":"vulnerability","state":"published","title":"jupyter-server authentication cookies remain valid after password reset due to static cookie secret","summary":"Jupyter Server is the backend for Jupyter web applications. In versions 2.17.0 and earlier, the secret used to sign authentication cookies is persisted to a static file at ~/.local/share/jupyter/runtime/jupyter_cookie_secret and is never rotated when a user changes their password. After a password reset and server restart, any previously issued authentication cookie remains cryptographically valid because the signing key has not changed. An attacker who has captured a session cookie through any means retains full authenticated access to the server regardless of subsequent password changes. This affects deployments using password-based authentication, particularly shared or public-facing servers where credential rotation is expected to revoke existing sessions. This issue has been fixed in version 2.18.0.","summarySource":"cvelist","descriptions":[{"lang":"en","text":"Jupyter Server is the backend for Jupyter web applications. In versions 2.17.0 and earlier, the secret used to sign authentication cookies is persisted to a static file at ~/.local/share/jupyter/runtime/jupyter_cookie_secret and is never rotated when a user changes their password. After a password reset and server restart, any previously issued authentication cookie remains cryptographically valid because the signing key has not changed. An attacker who has captured a session cookie through any means retains full authenticated access to the server regardless of subsequent password changes. This affects deployments using password-based authentication, particularly shared or public-facing servers where credential rotation is expected to revoke existing sessions. This issue has been fixed in version 2.18.0.","source":"cvelist"},{"lang":"en","text":"## Summary\n\nA persistent cookie secret vulnerability allows authenticated users to maintain indefinite access even after password changes. \n\nThe 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.\n\n## PoC\n\n- Start a Jupyter server with password authentication: `jupyter server password`, `jupyter server`\n- Log in with the password and capture the authentication cookie (e.g., just login with a browser).\n- Change the password to revoke access: `jupyter server password`\n- Restart the server\n- Use the old stolen cookie => remains valid and provides full authenticated access.\n\n## Impact\n\n- All jupyter-server deployments using password authentication where security incidents may occur\n- Multi-user systems where one user's compromised session should be revocable by administrators\n- Shared or public-facing Jupyter servers where credential rotation is a security requirement\n- Any deployment where password changes are expected to revoke existing sessions\n\n## Patches\n\nJupyter Server 2.18+\n\n## Workaround\n\n```bash\nrm ~/.local/share/jupyter/runtime/jupyter_cookie_secret\n# Then restart the server\n```","format":"markdown","source":"ghsa"},{"lang":"es","text":"Jupyter Server es el backend para las aplicaciones web de Jupyter. En las versiones 2.17.0 y anteriores, el secreto utilizado para firmar las cookies de autenticación se persiste en un archivo estático en ~/.local/share/jupyter/runtime/jupyter_cookie_secret y nunca se rota cuando un usuario cambia su contraseña. Después de un restablecimiento de contraseña y un reinicio del servidor, cualquier cookie de autenticación emitida previamente permanece criptográficamente válida porque la clave de firma no ha cambiado. Un atacante que ha capturado una cookie de sesión por cualquier medio retiene acceso autenticado completo al servidor independientemente de los cambios de contraseña posteriores. Esto afecta a las implementaciones que utilizan autenticación basada en contraseña, particularmente servidores compartidos o de cara al público donde se espera que la rotación de credenciales revoque las sesiones existentes. Este problema ha sido solucionado en la versión 2.18.0.","source":"nvd"}],"published":"2026-05-05T17:03:24.000Z","modified":"2026-09-10T03:50:45.692Z","severity":{"scorer":"GitHub_M","scheme":"CVSS:4.0","vector":"CVSS:4.0/AV:N/AC:L/AT:P/PR:L/UI:N/VC:H/VI:H/VA:N/SC:N/SI:N/SA:N","score":7.6,"rating":"HIGH"},"severities":[{"scorer":"GitHub_M","scheme":"CVSS:4.0","vector":"CVSS:4.0/AV:N/AC:L/AT:P/PR:L/UI:N/VC:H/VI:H/VA:N/SC:N/SI:N/SA:N","score":7.6,"rating":"HIGH"},{"scorer":"GitHub","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:N/AC:H/PR:L/UI:N/S:U/C:H/I:H/A:N","score":6.8,"rating":"HIGH"},{"scorer":"GitHub","scheme":"CVSS:4.0","vector":"CVSS:4.0/AV:N/AC:L/AT:P/PR:L/UI:N/VC:H/VI:H/VA:N/SC:N/SI:N/SA:N","rating":"HIGH"},{"scorer":"NVD","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:N/AC:H/PR:L/UI:N/S:U/C:H/I:H/A:N","score":6.8,"rating":"MEDIUM"},{"scorer":"PyPA Advisory Database","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:N/AC:H/PR:L/UI:N/S:U/C:H/I:H/A:N","score":6.8,"rating":"MEDIUM"}],"cwes":["CWE-613"],"affected":[{"ranges":[{"version":"< 2.18.0","status":"affected"}],"vendor":"jupyter-server","product":"jupyter_server","source":"cvelist"},{"ranges":[{"type":"ecosystem","introduced":"0","status":"affected","fixed":"2.18.0"}],"ecosystem":"PyPI","package":"jupyter-server","purl":"pkg:pypi/jupyter-server","source":"ghsa"},{"ranges":[{"status":"affected","fixed":"2.18.0"}],"vendor":"jupyter","product":"jupyter_server","cpe":"cpe:2.3:a:jupyter:jupyter_server:*:*:*:*:*:*:*:*","source":"nvd"},{"ranges":[{"type":"ecosystem","introduced":"0","status":"affected","fixed":"2.18.0"}],"ecosystem":"PyPI","package":"jupyter-server","purl":"pkg:pypi/jupyter-server","source":"pysec"}],"references":[{"url":"https://github.com/jupyter-server/jupyter_server/security/advisories/GHSA-5mrq-x3x5-8v8f","tags":["evidence","exploit","mitigation","vendor-advisory","web","x-refsource-confirm"],"sources":["cvelist","ghsa","nvd","pysec"]},{"url":"https://nvd.nist.gov/vuln/detail/CVE-2026-40934","tags":["advisory"],"sources":["ghsa"]},{"url":"https://github.com/jupyter-server/jupyter_server","tags":["package"],"sources":["ghsa"]},{"url":"https://github.com/pypa/advisory-database/tree/main/vulns/jupyter-server/PYSEC-2026-69.yaml","tags":["web"],"sources":["ghsa"]}],"credits":[],"assigner":"GitHub_M","ssvc":{"scorer":"CISA-ADP","exploitation":"none","automatable":"no","technicalImpact":"total","date":"2026-05-07T03:55:46.015Z"},"sources":[{"source":"cvelist","name":"CVE List","id":"CVE-2026-40934","url":"https://www.cve.org/CVERecord?id=CVE-2026-40934","licence":"CVE Terms of Use","modified":"2026-05-07T12:48:21.223Z"},{"source":"ghsa","name":"GitHub Advisory Database","id":"GHSA-5mrq-x3x5-8v8f","url":"https://github.com/advisories/GHSA-5mrq-x3x5-8v8f","licence":"CC-BY-4.0","modified":"2026-09-10T03:50:45.692Z"},{"source":"nvd","name":"NVD","id":"CVE-2026-40934","url":"https://nvd.nist.gov/vuln/detail/CVE-2026-40934","licence":"Public domain","modified":"2026-07-25T11:10:00.100Z"},{"source":"pysec","name":"PyPA Advisory Database","id":"PYSEC-2026-69","url":"https://osv.dev/vulnerability/PYSEC-2026-69","licence":"CC-BY-4.0","modified":"2026-05-20T09:19:02.981Z"}],"updatedAt":"2026-11-25T22:59:20.651Z","epss":{"score":0.00338,"percentile":0.29181,"date":"2026-12-02T12:00:21.000Z"}}