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

- Priority: **Routine**
- Reason: Not severe (CVSS 8.4, network access); no exploitation reported by the 5 checked sources
- Next step: Fix in the normal cadence
- Status: published
- Published: 2026-05-06 · Modified: 2026-05-08
- Aliases: 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, UBUNTU-CVE-2026-40171, DEBIAN-CVE-2026-40171, CGA-ghp6-7cf6-qp59, CGA-hwjx-8wx5-vj9q, CGA-jm82-3cp9-wrhp, CGA-rch7-5fgj-p775, CGA-3jw4-h425-9hpr, CGA-6vpg-f4c3-7jxp, CGA-g876-j2q3-2m6g, CGA-hhrq-f2vh-7r4x, CGA-j2f4-5h22-mpfg, CGA-j6pf-crxx-q6wj, CGA-m6fj-hqv7-66f3, CGA-p2x5-7q4m-fq4q, CGA-p5h8-pg73-6g5h, CGA-q9p3-97xp-hw3r, CGA-wfp2-27v4-7xq3, CGA-x3fh-p7qh-7fxq, ALPINE-CVE-2026-40171
- Record: https://cvemate.com/vulnerability/CVE-2026-40171 · JSON: https://cvemate.com/vulnerability/CVE-2026-40171/json

## Description

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

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

## Signals

- CVSS: 8.4 high (v4.0, CVE.org) 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
- EPSS: 0.599%, percentile 50.107%, as of 2026-12-04
- Known exploited (KEV): CISA not listed, ENISA not listed, CIRCL not listed
- Ransomware use: none recorded
- Public exploits: 0

## Affected

- alpine jupyter-notebook (Alpine Linux): \< 7.5.6-r0
- chainguard datahub-ingestion (Chainguard): \< 1.5.0.4-r0
- chainguard datahub-ingestion-fips (Chainguard): \< 1.5.0.1-r1
- chainguard jupyter-base-notebook (Chainguard): \< 7.5.6-r0
- chainguard tensorflow-cpu-jupyter (Chainguard): \< 2.21.0-r2
- chainguard tensorflow-gpu-jupyter (Chainguard): \< 2.21.0-r2
- wolfi jupyter-base-notebook (Wolfi): \< 7.5.6-r0
- debian jupyter-notebook (Debian): \< 7.4.7-3
- debian jupyterlab (Debian): All versions (No fix recorded) \| \< 4.4.10+ds1+~3.1.0+~0.16.6+~cs1.4.4-3
- ubuntu jupyter-notebook (Ubuntu): All versions (No fix recorded)
- jupyter-notebook help-extension: ≥ 7.0.0, ≤ 7.5.5
- jupyter notebook: ≥ 7.0.0, ≤ 7.5.5
- jupyterlab help-extension: ≤ 4.5.6
- jupyterlab jupyterlab: ≤ 4.5.6
- @jupyter-notebook help-extension (Npm): ≥ 7.0.0, \< 7.5.6
- @jupyterlab help-extension (Npm): \< 4.5.7
- PyPI jupyterlab (PyPI): \< 4.5.7
- PyPI notebook (PyPI): ≥ 7.0.0, \< 7.5.6

## References

- <https://github.com/jupyter/notebook/security/advisories/GHSA-rch3-82jr-f9w9>
- <https://nvd.nist.gov/vuln/detail/CVE-2026-40171>
- <https://github.com/jupyter/notebook>
- <https://jupyterlab.readthedocs.io/en/latest/user/commands.html#commands-in-markdown-output-and-files>
- <https://pypi.org/project/jupyterlab>
- <https://github.com/advisories/GHSA-rch3-82jr-f9w9>
- <https://pypi.org/project/notebook>
- <https://ubuntu.com/security/CVE-2026-40171>
- <https://www.cve.org/CVERecord?id=CVE-2026-40171>
- <https://security-tracker.debian.org/tracker/CVE-2026-40171>
- <https://github.com/CVEProject/cvelistV5/tree/main/cves/2026/40xxx/CVE-2026-40171.json>
- <https://security.alpinelinux.org/vuln/CVE-2026-40171>

---

Data as of 2026-12-05T09:21:36.288Z. The priority label is CveMate's own model from public evidence, not an official rating, and it knows nothing about your assets. How labels are decided: https://cvemate.com/faq#priority
