Your RSA-2048 keys break in 2030. Find every one of them before attackers do.
📦 npm🐍 PyPI

CVE-2026-40171

CVE-2026-40171 is a remote code execution vulnerability in @jupyter-notebook/help-extension. O3 Security confirms whether CVE-2026-40171 is actually reachable in your code before you act, and blocks exploitation at runtime until you patch.

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

Also known asBIT-jupyter-base-notebook-2026-40171BIT-jupyter-notebook-2026-40171BIT-jupyterlab-2026-40171GHSA-rch3-82jr-f9w9PYSEC-2026-2538PYSEC-2026-2682
Published
May 6, 2026
Updated
Aug 7, 2026
Affected
4 pkgs
Patched
4 / 4
Exploits
None indexed

Blast Radius

4 pkgs affected
📦@jupyter-notebook/help-extension📦@jupyterlab/help-extension🐍notebook🐍jupyterlab

Real-time download stats are indexed for npm and PyPI packages. This vulnerability affects npm, PyPI packages — download data is not available via public APIs for these ecosystems.

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 Packages

4 total 4 fixed
EcosystemPackageVulnerable rangeFix
📦npm@jupyter-notebook/help-extension7.0.0&&< 7.5.67.5.6
📦npm@jupyterlab/help-extensionall versions4.5.7
🐍PyPInotebook7.0.0&&< 7.5.67.5.6
🐍PyPIjupyterlaball versions4.5.7

Detection & mitigation playbook

Open-source dependency
  1. Detect

    Scan your dependency tree (package-lock.json, pnpm-lock.yaml, requirements.txt, go.sum, etc.) for @jupyter-notebook/help-extension. O3's reachability analysis confirms whether the vulnerable code path is actually invoked in your application, so you act on real exposure instead of every transitive match.

  2. Fix

    Update @jupyter-notebook/help-extension to 7.5.6 or later, then make sure no transitive (indirect) dependency still pins the vulnerable range — O3 confirms CVE-2026-40171 is resolved across your whole dependency graph.

  3. Workarounds

    If you can't upgrade right away: gate or disable the affected feature, validate untrusted input at the boundary, and avoid passing attacker-controlled data into the vulnerable path. O3's runtime protection blocks exploitation in production as an interim safeguard until the upgrade lands.

  4. How O3 protects you

    O3 pinpoints whether CVE-2026-40171 is reachable in your code and exactly where to fix it, then blocks exploitation in production at runtime until the patched version is deployed.

Tailored to CVE-2026-40171. Runtime protection reduces exposure until a permanent patch is applied and verified — it complements patching, it doesn't replace it.

Frequently Asked Questions

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 t
O3 Security · Impact-Aware SCA

Is CVE-2026-40171 in your dependencies?

O3 detects CVE-2026-40171 across npm, PyPI dependencies and uses function-level reachability to confirm whether the vulnerable code path is actually reachable — not just present. No false positives.