Skip to content
FlawDB
Sign in
Archived entry. Full-text search covers entries since 2026-11-10; exact IDs work for all years.

CVE-2026-40171

HIGH 8.4EPSS 47%

Jupyter Notebook and JupyterLab token theft via stored XSS in help command linker

Also known as BIT-jupyter-base-notebook-2026-40171, BIT-jupyter-notebook-2026-40171, BIT-jupyterlab-2026-40171, GHSA-rch3-82jr-f9w9, PYSEC-2026-2538, PYSEC-2026-2682

Mitigation

  • Upgrade @jupyter-notebook/help-extension to 7.5.6 or later.
  • Upgrade notebook to 7.5.6 or later.
  • Upgrade jupyterlab to 4.5.7 or later.
  • Upgrade @jupyterlab/help-extension to 4.5.7 or later.

Who should check

  • Projects that depend on npm package @jupyter-notebook/help-extension (>= 7.0.0, < 7.5.6)
  • Projects that depend on PyPI package notebook (>= 7.0.0, < 7.5.6)
  • Projects that depend on PyPI package jupyterlab (< 4.5.7)
  • Projects that depend on npm package @jupyterlab/help-extension (< 4.5.7)
  • Anyone running jupyter notebook >=7.0.0, <= 7.5.5
  • Anyone running jupyterlab help-extension <=4.5.6
  • Anyone running jupyterlab <= 4.5.6
  • Anyone running jupyter-notebook help-extension >=7.0.0,<= 7.5.5

Vulnerability facts

Affected
@jupyter-notebook/help-extension >= 7.0.0, < 7.5.6; notebook >= 7.0.0, < 7.5.6; jupyterlab < 4.5.7; @jupyterlab/help-extension < 4.5.7
Fixed in
7.5.6, 4.5.7
Exploited in the wild
Not in CISA KEV
Public exploit / PoC
None known
Remote exploitation
Remote, login needed
CVSS
8.4 (v4.0, CNA)CVSS:4.0/AV:N/AC:L/AT:N/PR:H/UI:A/VC:H/VI:H/VA:H/SC:N/SI:N/SA:NOpen in CVSS calculator
Show all 11 CVSS metrics
  • Attack vector: Network
  • Attack complexity: Low
  • Attack requirements: None
  • Privileges required: High
  • User interaction: Active
  • Confidentiality impact: High
  • Integrity impact: High
  • Availability impact: High
  • Confidentiality impact on other systems: None
  • Integrity impact on other systems: None
  • Availability impact on other systems: None
EPSS
0.66% chance of exploitation in 30 days (percentile 47, 2026-11-26)
CWE
CWE-79
Published
Modified

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 and fixed versions

Package / productAffectedFixedSource
npm @jupyter-notebook/help-extension>= 7.0.0, < 7.5.67.5.6osv
PyPI notebook>= 7.0.0, < 7.5.67.5.6osv
PyPI jupyterlab< 4.5.74.5.7osv
npm @jupyterlab/help-extension< 4.5.74.5.7osv
jupyter notebook>=7.0.0, <= 7.5.5—cvelist
jupyterlab help-extension<=4.5.6—cvelist
jupyterlab<= 4.5.6—cvelist
jupyter-notebook help-extension>=7.0.0,<= 7.5.5—cvelist

Check your systems with an agent

Paste this into Claude Code, Cursor or another coding agent. It only reads; it changes nothing.

Check whether anything I run is affected by CVE-2026-40171. Work read-only: do not install, upgrade, delete or change anything.

Details: https://flawdb.com/CVE-2026-40171.md
Affected: @jupyter-notebook/help-extension >= 7.0.0, < 7.5.6; notebook >= 7.0.0, < 7.5.6; jupyterlab < 4.5.7; @jupyterlab/help-extension < 4.5.7
Fixed in: 7.5.6, 4.5.7

Steps:
1. Search this machine and project for @jupyter-notebook/help-extension (npm), notebook (PyPI), jupyterlab (PyPI), @jupyterlab/help-extension (npm), jupyter notebook, jupyterlab help-extension: dependency manifests and lockfiles, installed packages, container images and running services.
2. For each match, note the installed version and whether it is inside the affected range.
3. Report a table: location, installed version, affected (yes / no / unsure), evidence. If affected, say which fixed version or mitigation from the details link applies, but don't apply it.

References

FAQ

Is CVE-2026-40171 being exploited?

There is no confirmed exploitation: CVE-2026-40171 is not in the CISA Known Exploited Vulnerabilities catalog. No public exploit code is known. EPSS estimates a 0.66% chance of exploitation in the next 30 days (as of 2026-11-26).

How serious is CVE-2026-40171?

High: CVSS 8.4 (v4.0, scored by CNA). Remote, login needed. A user has to take an action, such as opening a link, for the attack to work.

Which versions are affected by CVE-2026-40171?

@jupyter-notebook/help-extension >= 7.0.0, < 7.5.6; notebook >= 7.0.0, < 7.5.6; jupyterlab < 4.5.7; @jupyterlab/help-extension < 4.5.7.

Is there a fix for CVE-2026-40171?

Yes. Fixed in 7.5.6, 4.5.7. Upgrade @jupyter-notebook/help-extension to 7.5.6 or later. Upgrade notebook to 7.5.6 or later. Upgrade jupyterlab to 4.5.7 or later. Upgrade @jupyterlab/help-extension to 4.5.7 or later.

How do I check if I'm affected by CVE-2026-40171?

Find where you use the affected software (dependency lockfiles, installed packages, container images, servers) and compare the installed version with the affected range above. The agent prompt on this page does this read-only.

Sponsors