# CVE-2026-40171: Jupyter Notebook and JupyterLab token theft via stored XSS in help command linker

- Severity: High 8.4 (CVSS:4.0, scored by GitHub_M) `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`
- Known to be exploited: not in CISA's catalogue, which lists only what CISA has confirmed
- Likelihood of exploitation in the next 30 days (EPSS): 0.48%, higher than 42% of CVEs (2026-12-02)
- Published: 2026-04-30T17:25:47.000Z
- Modified: 2026-10-26T19:10:00.163Z
- Also known as: 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
- Weaknesses: CWE-79, CWE-601
- SSVC (CISA-ADP): exploitation none, automatable no, technical impact total
- Assigned by: GitHub_M

## Description

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.

An 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.

(As written by CVE List.)

## Affected

- jupyter notebook: >=7.0.0, <= 7.5.5
- jupyterlab help-extension: <=4.5.6
- jupyterlab jupyterlab: <= 4.5.6
- jupyter-notebook help-extension: >=7.0.0,<= 7.5.5
- @jupyter-notebook/help-extension (npm): from 7.0.0 before 7.5.6
- notebook (PyPI): from 7.0.0 before 7.5.6
- jupyterlab (PyPI): before 4.5.7
- @jupyterlab/help-extension (npm): before 4.5.7
- jupyter-base-notebook (Bitnami): from 7.0.0 before 7.5.6
- jupyter-notebook (Bitnami): from 7.0.0 before 7.5.6
- jupyterlab (Bitnami): before 4.5.7

## Every score

- GitHub_M: CVSS:4.0 8.4 High `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`
- GitHub: CVSS:4.0 High `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`
- PyPA Advisory Database: CVSS:4.0 `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`
- Bitnami Vulnerability Database: rating High

## References

- <https://github.com/jupyter/notebook/security/advisories/GHSA-rch3-82jr-f9w9> (web)
- <https://nvd.nist.gov/vuln/detail/CVE-2026-40171> (advisory, web)
- <https://github.com/jupyter/notebook> (package)
- <https://jupyterlab.readthedocs.io/en/latest/user/commands.html#commands-in-markdown-output-and-files> (web)
- <https://pypi.org/project/jupyterlab> (package)
- <https://github.com/advisories/GHSA-rch3-82jr-f9w9> (advisory)
- <https://pypi.org/project/notebook> (package)

## Sources

- CVE List: [CVE-2026-40171](https://www.cve.org/CVERecord?id=CVE-2026-40171), CVE Terms of Use, modified 2026-05-08
- GitHub Advisory Database: [GHSA-rch3-82jr-f9w9](https://github.com/advisories/GHSA-rch3-82jr-f9w9), CC-BY-4.0, modified 2026-09-10
- NVD: [CVE-2026-40171](https://nvd.nist.gov/vuln/detail/CVE-2026-40171), Public domain, modified 2026-10-26
- PyPA Advisory Database: [PYSEC-2026-2538](https://osv.dev/vulnerability/PYSEC-2026-2538), CC-BY-4.0, modified 2026-07-13
- PyPA Advisory Database: [PYSEC-2026-2682](https://osv.dev/vulnerability/PYSEC-2026-2682), CC-BY-4.0, modified 2026-07-13
- Bitnami Vulnerability Database: [BIT-JUPYTER-BASE-NOTEBOOK-2026-40171](https://osv.dev/vulnerability/BIT-JUPYTER-BASE-NOTEBOOK-2026-40171), Apache-2.0, modified 2026-07-13
- Bitnami Vulnerability Database: [BIT-JUPYTER-NOTEBOOK-2026-40171](https://osv.dev/vulnerability/BIT-JUPYTER-NOTEBOOK-2026-40171), Apache-2.0, modified 2026-07-13
- Bitnami Vulnerability Database: [BIT-JUPYTERLAB-2026-40171](https://osv.dev/vulnerability/BIT-JUPYTERLAB-2026-40171), Apache-2.0, modified 2026-07-13

---

Page: https://cve.day/CVE-2026-40171 · Whole record: https://cve.day/CVE-2026-40171.json · Rebuilt by cve.day 2026-11-25T22:59:20.820Z
