CVE-2026-40171: Jupyter Notebook Vulnerable to Authentication Token Theft via CommandLinker XSS
Impact A stored Cross-Site Scripting (XSS) vulnerability in Jupyter Notebook allows attackers to steal authentication tokens from users who open malicious notebook files and interact with elements that the attacker can make look indistinguishable from legitimate controls (single click interaction). The vulnerability enables complete account takeover through the Jupyter REST API, allowing the attacker to: 1.
Published Apr 30, 2026 · Updated May 8, 2026
Affected packages
@jupyter-notebook/help-extension
- Ecosystem
- npm
- Affected
- >= 7.0.0, <= 7.5.5
- Fixed in
- 7.5.6
- Check
npm ls @jupyter-notebook/help-extension
notebook
- Ecosystem
- PyPI
- Affected
- >= 7.0.0, <= 7.5.5
- Fixed in
- 7.5.6
- Check
pip show notebook
jupyterlab
- Ecosystem
- PyPI
- Affected
- <= 4.5.6
- Fixed in
- 4.5.7
- Check
pip show jupyterlab
@jupyterlab/help-extension
- Ecosystem
- npm
- Affected
- <= 4.5.6
- Fixed in
- 4.5.7
- Check
npm ls @jupyterlab/help-extension
Advisory details
From the GitHub Advisory Database (CC BY 4.0).
Impact
A stored Cross-Site Scripting (XSS) vulnerability in Jupyter Notebook allows attackers to steal authentication tokens from users who open malicious notebook files and interact with elements that the attacker can make look indistinguishable from legitimate controls (single click interaction).
The vulnerability enables complete account takeover through the Jupyter REST API, allowing the attacker to:
- Read all files
- Modify/create files
- Access running kernels and execute arbitrary code
- Create terminals for shell access
Patches
Jupyter Notebook 7.5.6 and JupyterLab 4.5.7 include patches for this vulnerability.
Workarounds
The help extension can be disabled via CLI:
jupyter labextension disable @jupyter-notebook/help-extension
jupyter labextension disable @jupyterlab/help-extensionHardening
The patched versions include a toggle to disable the command linker functionality altogether, for example via overrides.json:
{
"@jupyterlab/apputils-extension:sanitizer": {
"allowCommandLinker": false
}
}Resources
- https://jupyterlab.readthedocs.io/en/latest/user/commands.html#commands-in-markdown-output-and-files
Acknowledgments
Reported by Daniel Teixeira - NVIDIA AI Red Team
Credited to dtrops, Carreau, Yann-P, krassowski, jtpio.
References
How this page is made: the data panel comes from the GitHub Advisory Database, CISA’s KEV catalog, the NVD and FIRST EPSS, and updates twice a day. No analysis has been written for this entry yet. Methodology
More npm vulnerabilities
All npm entriesCVE-2026-102832
JupyterLab: Command link trust prompt in JupyterLab can trust a document other than the one clicked
medium4.2Oct 15, 2026CVE-2026-102830
JupyterLab: Cross-site scripting (XSS) in JupyterLab via crafted language package (jupyterlab.json)
medium6.8Oct 1, 2026CVE-2026-102831
JupyterLab: Cross-site scripting (XSS) in JupyterLab via notebook cells pasted from the system clipboard
high8.1Oct 1, 2026CVE-2026-102904
JupyterLab: Argument injection in JupyterLab extension uninstall exposes server-readable files and internal URLs
medium5.4Oct 1, 2026CVE-2026-73415
JupyterLab: Image viewer allows XSS when opening malicious image in new browser tab
high7.5Jul 22, 2026CVE-2026-73416
JupyterLab: PyPI extension blocklist package-name canonicalization bypass
medium6.1Jul 22, 2026
