{"id":"CVE-2026-40171","aliases":["CVE-2026-40171","GHSA-rch3-82jr-f9w9","BIT-JUPYTER-BASE-NOTEBOOK-2026-40171","BIT-JUPYTER-NOTEBOOK-2026-40171","BIT-JUPYTERLAB-2026-40171","PYSEC-2026-2538","PYSEC-2026-2682"],"related":[],"kind":"vulnerability","state":"published","title":"Jupyter Notebook and JupyterLab token theft via stored XSS in help command linker","summary":"In Jupyter Notebook versions 7.0.0 through 7.5.5, JupyterLab versions 4.5.6 and earlier, and the corresponding @jupyter-notebook/help-extension and @jupyterlab/help-extension packages before 7.5.6 and 4.5.7, a stored cross-site scripting issue in the help command linker can be chained with attacker-controlled notebook content to steal authentication tokens with a single click.\n\nAn attacker can craft a malicious notebook file containing elements that appear indistinguishable from legitimate controls and trigger execution when a user interacts with them. Successful exploitation allows theft of the user's authentication token and complete takeover of the Jupyter session through the REST API, including reading files, creating or modifying files, accessing kernels to execute arbitrary code, and creating terminals for shell access. This issue has been fixed in Notebook 7.5.6, JupyterLab 4.5.7, @jupyter-notebook/help-extension 7.5.6, and @jupyterlab/help-extension 4.5.7. As a workaround, disable the affected help extensions or set allowCommandLinker to false in the sanitizer configuration.","summarySource":"cvelist","descriptions":[{"lang":"en","text":"In Jupyter Notebook versions 7.0.0 through 7.5.5, JupyterLab versions 4.5.6 and earlier, and the corresponding @jupyter-notebook/help-extension and @jupyterlab/help-extension packages before 7.5.6 and 4.5.7, a stored cross-site scripting issue in the help command linker can be chained with attacker-controlled notebook content to steal authentication tokens with a single click.\n\nAn attacker can craft a malicious notebook file containing elements that appear indistinguishable from legitimate controls and trigger execution when a user interacts with them. Successful exploitation allows theft of the user's authentication token and complete takeover of the Jupyter session through the REST API, including reading files, creating or modifying files, accessing kernels to execute arbitrary code, and creating terminals for shell access. This issue has been fixed in Notebook 7.5.6, JupyterLab 4.5.7, @jupyter-notebook/help-extension 7.5.6, and @jupyterlab/help-extension 4.5.7. As a workaround, disable the affected help extensions or set allowCommandLinker to false in the sanitizer configuration.","source":"cvelist"},{"lang":"en","text":"### Impact\n\nA stored Cross-Site Scripting (XSS) vulnerability in Jupyter Notebook allows attackers to steal authentication tokens from users who open malicious notebook files and interact with elements that the attacker can make look indistinguishable from legitimate controls (single click interaction).\n\nThe vulnerability enables complete account takeover through the Jupyter REST API, allowing the attacker to:\n1. Read all files\n2. Modify/create files\n3. Access running kernels and execute arbitrary code\n4. Create terminals for shell access\n\n### Patches\n\nJupyter Notebook 7.5.6 and JupyterLab 4.5.7 include patches for this vulnerability.\n\n### Workarounds\n\nThe help extension can be disabled via CLI:\n\n```\njupyter labextension disable @jupyter-notebook/help-extension\njupyter labextension disable @jupyterlab/help-extension\n```\n\n### Hardening\n\nThe patched versions include a toggle to disable the command linker functionality altogether, for example via `overrides.json`:\n\n```json\n{\n  \"@jupyterlab/apputils-extension:sanitizer\": {\n    \"allowCommandLinker\": false\n  }\n}\n```\n\n### Resources\n\n- https://jupyterlab.readthedocs.io/en/latest/user/commands.html#commands-in-markdown-output-and-files\n\n### Acknowledgments\n\nReported by Daniel Teixeira - NVIDIA AI Red Team","format":"markdown","source":"ghsa"},{"lang":"es","text":"En las versiones de Jupyter Notebook 7.0.0 a 7.5.5, las versiones de JupyterLab 4.5.6 y anteriores, y los paquetes correspondientes @jupyter-notebook/help-extension y @jupyterlab/help-extension anteriores a 7.5.6 y 4.5.7, un problema de cross-site scripting almacenado en el enlazador de comandos de ayuda puede encadenarse con contenido de notebook controlado por el atacante para robar tokens de autenticación con un solo clic.\n\nUn atacante puede crear un archivo de notebook malicioso que contenga elementos que parezcan indistinguibles de los controles legítimos y activar la ejecución cuando un usuario interactúa con ellos. La explotación exitosa permite el robo del token de autenticación del usuario y la toma de control completa de la sesión de Jupyter a través de la API REST, incluyendo la lectura de archivos, la creación o modificación de archivos, el acceso a kernels para ejecutar código arbitrario y la creación de terminales para acceso a la shell. Este problema ha sido solucionado en Notebook 7.5.6, JupyterLab 4.5.7, @jupyter-notebook/help-extension 7.5.6 y @jupyterlab/help-extension 4.5.7. Como solución alternativa, deshabilite las extensiones de ayuda afectadas o establezca allowCommandLinker en false en la configuración del saneador.","source":"nvd"}],"published":"2026-04-30T17:25:47.000Z","modified":"2026-10-26T19:10:00.163Z","severity":{"scorer":"GitHub_M","scheme":"CVSS:4.0","vector":"CVSS:4.0/AV:N/AC:L/AT:N/PR:H/UI:A/VC:H/VI:H/VA:H/SC:N/SI:N/SA:N","score":8.4,"rating":"HIGH"},"severities":[{"scorer":"GitHub_M","scheme":"CVSS:4.0","vector":"CVSS:4.0/AV:N/AC:L/AT:N/PR:H/UI:A/VC:H/VI:H/VA:H/SC:N/SI:N/SA:N","score":8.4,"rating":"HIGH"},{"scorer":"GitHub","scheme":"CVSS:4.0","vector":"CVSS:4.0/AV:N/AC:L/AT:N/PR:H/UI:A/VC:H/VI:H/VA:H/SC:N/SI:N/SA:N","rating":"HIGH"},{"scorer":"PyPA Advisory Database","scheme":"CVSS:4.0","vector":"CVSS:4.0/AV:N/AC:L/AT:N/PR:H/UI:A/VC:H/VI:H/VA:H/SC:N/SI:N/SA:N"},{"scorer":"Bitnami Vulnerability Database","scheme":"rating","rating":"HIGH"}],"cwes":["CWE-79","CWE-601"],"affected":[{"ranges":[{"version":">=7.0.0, <= 7.5.5","status":"affected"}],"vendor":"jupyter","product":"notebook","source":"cvelist"},{"ranges":[{"version":"<=4.5.6","status":"affected"}],"vendor":"jupyterlab","product":"help-extension","source":"cvelist"},{"ranges":[{"version":"<= 4.5.6","status":"affected"}],"vendor":"jupyterlab","product":"jupyterlab","source":"cvelist"},{"ranges":[{"version":">=7.0.0,<= 7.5.5","status":"affected"}],"vendor":"jupyter-notebook","product":"help-extension","source":"cvelist"},{"ranges":[{"type":"semver","introduced":"7.0.0","status":"affected","fixed":"7.5.6"}],"ecosystem":"npm","package":"@jupyter-notebook/help-extension","purl":"pkg:npm/%40jupyter-notebook/help-extension","source":"ghsa"},{"ranges":[{"type":"ecosystem","introduced":"7.0.0","status":"affected","fixed":"7.5.6"}],"ecosystem":"PyPI","package":"notebook","purl":"pkg:pypi/notebook","source":"ghsa"},{"ranges":[{"type":"ecosystem","introduced":"0","status":"affected","fixed":"4.5.7"}],"ecosystem":"PyPI","package":"jupyterlab","purl":"pkg:pypi/jupyterlab","source":"ghsa"},{"ranges":[{"type":"semver","introduced":"0","status":"affected","fixed":"4.5.7"}],"ecosystem":"npm","package":"@jupyterlab/help-extension","purl":"pkg:npm/%40jupyterlab/help-extension","source":"ghsa"},{"ranges":[{"type":"ecosystem","introduced":"0","status":"affected","fixed":"4.5.7"}],"ecosystem":"PyPI","package":"jupyterlab","purl":"pkg:pypi/jupyterlab","source":"pysec"},{"ranges":[{"type":"ecosystem","introduced":"7.0.0","status":"affected","fixed":"7.5.6"}],"ecosystem":"PyPI","package":"notebook","purl":"pkg:pypi/notebook","source":"pysec"},{"ranges":[{"type":"semver","introduced":"7.0.0","status":"affected","fixed":"7.5.6"}],"ecosystem":"Bitnami","package":"jupyter-base-notebook","purl":"pkg:bitnami/jupyter-base-notebook","source":"bitnami"},{"ranges":[{"type":"semver","introduced":"7.0.0","status":"affected","fixed":"7.5.6"}],"ecosystem":"Bitnami","package":"jupyter-notebook","purl":"pkg:bitnami/jupyter-notebook","source":"bitnami"},{"ranges":[{"type":"semver","introduced":"0","status":"affected","fixed":"4.5.7"}],"ecosystem":"Bitnami","package":"jupyterlab","purl":"pkg:bitnami/jupyterlab","source":"bitnami"}],"references":[{"url":"https://github.com/jupyter/notebook/security/advisories/GHSA-rch3-82jr-f9w9","tags":["web","x-refsource-confirm"],"sources":["cvelist","ghsa","nvd","pysec","bitnami"]},{"url":"https://nvd.nist.gov/vuln/detail/CVE-2026-40171","tags":["advisory","web"],"sources":["ghsa","pysec","bitnami"]},{"url":"https://github.com/jupyter/notebook","tags":["package"],"sources":["ghsa","pysec"]},{"url":"https://jupyterlab.readthedocs.io/en/latest/user/commands.html#commands-in-markdown-output-and-files","tags":["web"],"sources":["ghsa","pysec"]},{"url":"https://pypi.org/project/jupyterlab","tags":["package"],"sources":["pysec"]},{"url":"https://github.com/advisories/GHSA-rch3-82jr-f9w9","tags":["advisory"],"sources":["pysec"]},{"url":"https://pypi.org/project/notebook","tags":["package"],"sources":["pysec"]}],"credits":[],"assigner":"GitHub_M","ssvc":{"scorer":"CISA-ADP","exploitation":"none","automatable":"no","technicalImpact":"total","date":"2026-05-07T00:00:00.000Z"},"sources":[{"source":"cvelist","name":"CVE List","id":"CVE-2026-40171","url":"https://www.cve.org/CVERecord?id=CVE-2026-40171","licence":"CVE Terms of Use","modified":"2026-05-08T03:55:41.465Z"},{"source":"ghsa","name":"GitHub Advisory Database","id":"GHSA-rch3-82jr-f9w9","url":"https://github.com/advisories/GHSA-rch3-82jr-f9w9","licence":"CC-BY-4.0","modified":"2026-09-10T03:51:03.066Z"},{"source":"nvd","name":"NVD","id":"CVE-2026-40171","url":"https://nvd.nist.gov/vuln/detail/CVE-2026-40171","licence":"Public domain","modified":"2026-10-26T19:10:00.163Z"},{"source":"pysec","name":"PyPA Advisory Database","id":"PYSEC-2026-2538","url":"https://osv.dev/vulnerability/PYSEC-2026-2538","licence":"CC-BY-4.0","modified":"2026-07-13T16:42:47.886Z"},{"source":"pysec","name":"PyPA Advisory Database","id":"PYSEC-2026-2682","url":"https://osv.dev/vulnerability/PYSEC-2026-2682","licence":"CC-BY-4.0","modified":"2026-07-13T16:42:47.886Z"},{"source":"bitnami","name":"Bitnami Vulnerability Database","id":"BIT-JUPYTER-BASE-NOTEBOOK-2026-40171","url":"https://osv.dev/vulnerability/BIT-JUPYTER-BASE-NOTEBOOK-2026-40171","licence":"Apache-2.0","modified":"2026-07-13T16:42:47.886Z"},{"source":"bitnami","name":"Bitnami Vulnerability Database","id":"BIT-JUPYTER-NOTEBOOK-2026-40171","url":"https://osv.dev/vulnerability/BIT-JUPYTER-NOTEBOOK-2026-40171","licence":"Apache-2.0","modified":"2026-07-13T16:42:47.886Z"},{"source":"bitnami","name":"Bitnami Vulnerability Database","id":"BIT-JUPYTERLAB-2026-40171","url":"https://osv.dev/vulnerability/BIT-JUPYTERLAB-2026-40171","licence":"Apache-2.0","modified":"2026-07-13T16:42:47.886Z"}],"updatedAt":"2026-11-25T22:59:20.820Z","epss":{"score":0.00476,"percentile":0.4278,"date":"2026-12-02T12:00:21.000Z"}}