CVE-2026-40171: Jupyter Notebook and JupyterLab token theft via stored XSS in help command linker
Vulnerability summary
CVE-2026-40171 is a high (CVSS 8.4) vulnerability in jupyter-notebook help-extension. EPSS estimates a 0.60% chance of exploitation in the next 30 days, higher than 50.1% of scored vulnerabilities.
Not severe (CVSS 8.4, network access); no exploitation reported by the 5 checked sources
Source freshness unavailable
How is this decided?Advisory lineage
Upstream 0 · Downstream 2 · Related 3Timeline
- 06-05-2026PublishedVulnerability first disclosed.
- 08-05-2026Last modifiedVulnerability information updated.
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.
CVSS metrics
9 scores · 9 sources · 1 version- OSV · PypiEcosystem advisory · calculated8.4HighCVSS:4.0/AV:N/AC:L/AT:N/PR:H/UI:A/VC:H/VI:H/VA:H/SC:N/SI:N/SA:N
- OSV · UbuntuEcosystem advisory · calculated8.4HighCVSS:4.0/AV:N/AC:L/AT:N/PR:H/UI:A/VC:H/VI:H/VA:H/SC:N/SI:N/SA:N
- OSV · DebianEcosystem advisory · calculated8.4HighCVSS:4.0/AV:N/AC:L/AT:N/PR:H/UI:A/VC:H/VI:H/VA:H/SC:N/SI:N/SA:N/E:X/CR:X/IR:X/AR:X/MAV:X/MAC:X/MAT:X/MPR:X/MUI:X/MVC:X/MVI:X/MVA:X/MSC:X/MSI:X/MSA:X/S:X/AU:X/R:X/V:X/RE:X/U:X
- OSV · WolfiEcosystem advisory · calculated8.4HighCVSS:4.0/AV:N/AC:L/AT:N/PR:H/UI:A/VC:H/VI:H/VA:H/SC:N/SI:N/SA:N
- OSV · NpmEcosystem advisory · calculated8.4HighCVSS:4.0/AV:N/AC:L/AT:N/PR:H/UI:A/VC:H/VI:H/VA:H/SC:N/SI:N/SA:N
- OSV · ChainguardEcosystem advisory · calculated8.4HighCVSS:4.0/AV:N/AC:L/AT:N/PR:H/UI:A/VC:H/VI:H/VA:H/SC:N/SI:N/SA:N
- NVDNIST8.4HighCVSS:4.0/AV:N/AC:L/AT:N/PR:H/UI:A/VC:H/VI:H/VA:H/SC:N/SI:N/SA:N/E:X/CR:X/IR:X/AR:X/MAV:X/MAC:X/MAT:X/MPR:X/MUI:X/MVC:X/MVI:X/MVA:X/MSC:X/MSI:X/MSA:X/S:X/AU:X/R:X/V:X/RE:X/U:X
- OSV · AlpineEcosystem advisory · calculated8.4HighCVSS:4.0/AV:N/AC:L/AT:N/PR:H/UI:A/VC:H/VI:H/VA:H/SC:N/SI:N/SA:N/E:X/CR:X/IR:X/AR:X/MAV:X/MAC:X/MAT:X/MPR:X/MUI:X/MVC:X/MVI:X/MVA:X/MSC:X/MSI:X/MSA:X/S:X/AU:X/R:X/V:X/RE:X/U:X
EPSS trend
Probability
0.60%
Chance of exploitation in the next 30 days
Percentile
50%
Versus all other CVEs
30-day change
Increase +0.12 pp
From 0.48% on 04-11-2026
Known exploited
Compare KEV catalogsNot in the CISA KEV catalog.
Not in the ENISA CNW catalog.
Not in the CIRCL catalog.
Public exploits
0 foundNo public exploits indexed.
Weaknesses
CWE · root causeAffected systems
Known conditions: network-reachable, administrative account, user interaction (CVSS vector). Other conditions: not stated in public data.
Chainguard5 products
- datahub-ingestion< 1.5.0.4-r0
- datahub-ingestion-fips< 1.5.0.1-r1
- jupyter-base-notebook< 7.5.6-r0
- tensorflow-cpu-jupyter< 2.21.0-r2
- tensorflow-gpu-jupyter< 2.21.0-r2
Debian2 products
- jupyter-notebook< 7.4.7-3
- jupyterlabAll versions (No fix recorded) | < 4.4.10+ds1+~3.1.0+~0.16.6+~cs1.4.4-3
Jupyterlab2 products
- help-extension≤ 4.5.6
- jupyterlab≤ 4.5.6
PyPI2 products
- jupyterlab< 4.5.7
- notebook≥ 7.0.0, < 7.5.6
@jupyter-notebook1 product
- help-extension≥ 7.0.0, < 7.5.6
@jupyterlab1 product
- help-extension< 4.5.7
Alpine1 product
- jupyter-notebook< 7.5.6-r0
Jupyter1 product
- notebook≥ 7.0.0, ≤ 7.5.5
Jupyter-notebook1 product
- help-extension≥ 7.0.0, ≤ 7.5.5
Ubuntu1 product
- jupyter-notebookAll versions (No fix recorded)
Wolfi1 product
- jupyter-base-notebook< 7.5.6-r0
11 vendors · 18 products
References
12 links- github.com/jupyter/notebookPACKAGE
- pypi.org/project/jupyterlabPACKAGE
- pypi.org/project/notebookPACKAGE