CVEfocus › CVE database › CVE-2026-40171

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

CVSS 8.4 HighEPSS 0.7% (higher than 47% of CVEs)Published 2026-05-06Updated 2026-05-08Assigner: GitHub_M

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.

CWE-79

What to do

Fixed builds are available from Alpine, Debian, PyPI, npm: see the table below for the fixed version per release.

Debian, Ubuntu have not shipped a fix for every release yet.

Is your server affected? One read-only command checks every installed package against this CVE and all others, using each vendor's fixed versions. Get started or get a free API key.

curl -sS "https://api.cvefocus.com/v1/check?format=text" -H "Authorization: Bearer $CVEFOCUS_KEY" \
  -H "Content-Type: text/plain" --data-binary @inventory.txt

Vendor status at a glance

7Fixed
2Fix pending
1Will not fix
1Not affected

Status by vendor and release

From each vendor's own security data and VEX statements. "Fixed" means a fixed build is published for that release.

ReleasePackageStatusFixed versionAdvisory
Ubuntu 26.10jupyter-notebookFix pendingUBUNTU-CVE-2026-40171
Ubuntu 26.04jupyter-notebookNot affected
vulnerable_code_not_present
Ubuntu 25.10jupyter-notebookWill not fix
Ubuntu decided not to fix this in this release
UBUNTU-CVE-2026-40171
Debian 14jupyter-notebookFixed7.4.7-3DEBIAN-CVE-2026-40171
Debian 14jupyterlabFixed4.4.10+ds1+~3.1.0+~0.16.6+~cs1.4.4-3DEBIAN-CVE-2026-40171
Debian 13jupyterlabFix pendingDEBIAN-CVE-2026-40171
Alpine Linux 3.24jupyter-notebookFixed7.5.6-r0ALPINE-CVE-2026-40171
npm library@jupyter-notebook/help-extensionFixed7.5.6GHSA-rch3-82jr-f9w9
npm library@jupyterlab/help-extensionFixed4.5.7GHSA-rch3-82jr-f9w9
PyPI libraryjupyterlabFixed4.5.7GHSA-rch3-82jr-f9w9
PyPI librarynotebookFixed7.5.6GHSA-rch3-82jr-f9w9

What the vendor says

As published in the CVE record by GitHub_M, the CVE's assigner (usually the vendor). Check the vendor's advisory before acting.

References

About this page

Compiled by CVEfocus from the CVE List, the security data and VEX statements of Ubuntu, Debian, Red Hat, AlmaLinux, Rocky Linux and Microsoft, CISA's Known Exploited Vulnerabilities catalog and FIRST EPSS, refreshed several times a day (data status). Information only; see the disclaimer. Official record: cve.org · NVD.