Vulnerability · Published May 6, 2026 · Assigned by GitHub_M
CVE-2026-40171Jupyter Notebook and JupyterLab token theft via stored XSS in help command linker
High 8.4
In plain English
A high-severity cross-site scripting in notebook from jupyter. There are no confirmed reports of exploitation so far. The chance it is exploited in the next 30 days is estimated at 0.5% (higher than 41% of all known vulnerabilities). Fixed versions are available - upgrade the affected package.
Official 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.
Affected packages & fixed versions
| Ecosystem | Package | Fixed in | Advisory |
|---|---|---|---|
| Alpine:v3.24 | jupyter-notebook | 7.5.6-r0 | ALPINE-CVE-2026-40171 |
| Debian:14 | jupyter-notebook | 7.4.7-3 | DEBIAN-CVE-2026-40171 |
| Debian:13 | jupyterlab | no fix listed | DEBIAN-CVE-2026-40171 |
| Debian:14 | jupyterlab | 4.4.10+ds1+~3.1.0+~0.16.6+~cs1.4.4-3 | DEBIAN-CVE-2026-40171 |
| PyPI | jupyterlab | 4.5.7 | GHSA-rch3-82jr-f9w9 |
| PyPI | jupyterlab | 4.5.7 | PYSEC-2026-2538 |
| PyPI | notebook | 7.5.6 | PYSEC-2026-2682 |
| PyPI | notebook | 7.5.6 | GHSA-rch3-82jr-f9w9 |
| Ubuntu:25.10 | jupyter-notebook | no fix listed | UBUNTU-CVE-2026-40171 |
| Ubuntu:26.10 | jupyter-notebook | no fix listed | UBUNTU-CVE-2026-40171 |
| npm | @jupyter-notebook/help-extension | 7.5.6 | GHSA-rch3-82jr-f9w9 |
| npm | @jupyterlab/help-extension | 4.5.7 | GHSA-rch3-82jr-f9w9 |
Affected products (as reported)
| Vendor | Product | Versions |
|---|---|---|
| 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 |
Weakness: CWE-79 · 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
References
- https://github.com/jupyter/notebook/security/advisories/GHSA-rch3-82jr-f9w9 x_refsource_CONFIRM