High severity · published May 6, 2026
CVE-2026-40171
Jupyter Notebook and JupyterLab token theft via stored XSS in help command linker
8.4
CVSS
0.5%
EPSS
No
On KEV
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.
Exploitation
Is it being used?
Exploit prediction (EPSS)0.5% · higher than 41% of CVEs
Exploited in the wildNo evidence yet
CISA KEVNot listed
Ransomware campaign useNot known
Affected products
Which versions
HE
help-extension · jupyterlab
<=4.5.6 · source: vendor
JU
jupyterlab · jupyterlab
<= 4.5.6 · source: vendor
NO
notebook · jupyter
>=7.0.0, <= 7.5.5 · source: vendor
References
NVD
https://nvd.nist.gov/vuln/detail/CVE-2026-40171
CVE.org
https://www.cve.org/CVERecord?id=CVE-2026-40171
github.com
https://github.com/jupyter/notebook/security/advisories/GHSA-rch3-82jr-f9w9
More from notebook
9.6
CVE-2026-42557
jupyterlab: Command linker attributes in HTML enable one-click command execution from untrusted content
9.6
CVE-2021-32798
The Jupyter notebook is a web-based notebook environment for interactive computing
7.8
CVE-2018-8768
In Jupyter Notebook before 5.4.1, a maliciously forged notebook file can bypass sanitization to execute JavaScript in the notebook context
7.5
CVE-2022-24758
The Jupyter notebook is a web-based notebook environment for interactive computing
6.5
CVE-2024-22421
JupyterLab is an extensible environment for interactive and reproducible computing, based on the Jupyter Notebook and Architecture
