CVE-2026-40171 — @jupyter-notebook/help-ex…
CVE-2026-40171 is a Cross-site Scripting (XSS) vulnerability in @jupyter-notebook/help-extension. A fix is available for @jupyter-notebook/help-extension — see the affected versions and patch details below.
Jupyter Notebook and JupyterLab token theft via stored XSS in help command linker
Exploitation Status
No confirmed exploitation observed yet
- A successful exploit gives an attacker total control of the affected component, not partial access.
- CISA’s own triage has not observed active exploitation or public proof-of-concept code for this CVE as of its last assessment.
Exploitation and automatability from CISA’s SSVC triage for CVE-2026-40171.
EPSS Exploitation Probability
EPSS (Exploit Prediction Scoring System) is a daily probability model maintained by FIRST.org. It estimates the likelihood a CVE will be exploited in production environments within the next 30 days, derived from real-world threat intelligence signals.
Real-World Exposure
How broadly this vulnerability is actually deployed: weekly install volume shows current usage, and reverse-dependency count shows how many other packages break if it stays unpatched.
@jupyter-notebook/help-extensionnpm@jupyterlab/help-extensionnpmDescription
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
| Ecosystem | Package | Vulnerable range | Fix |
|---|---|---|---|
| 📦npm | @jupyter-notebook/help-extension | ≥ 7.0.0&&< 7.5.6 | 7.5.6npm install @jupyter-notebook/help-extension@7.5.6 |
| 📦npm | @jupyterlab/help-extension | all versions | 4.5.7npm install @jupyterlab/help-extension@4.5.7 |
| 🐍PyPI | notebook | ≥ 7.0.0&&< 7.5.6 | 7.5.6pip install --upgrade 'notebook==7.5.6' |
| 🐍PyPI | jupyterlab | all versions | 4.5.7pip install --upgrade 'jupyterlab==4.5.7' |
Detection & mitigation playbook
Open-source dependencyDetect
Scan your dependency tree (package-lock.json, pnpm-lock.yaml, requirements.txt, go.sum, etc.) for @jupyter-notebook/help-extension, including transitive dependencies — a direct dependency you never call can still pull in a vulnerable version.
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.
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.
How O3 protects you
O3 Security's impact-aware SCA analyses which vulnerable code paths your application actually calls, so a match like CVE-2026-40171 can be triaged on real exposure rather than presence alone.
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.
Fixing This On Your OS
If you run this on a Linux distribution, patch through your package manager against the distro's own security advisory below — it tracks the exact backported fix for your release, which can ship on a different timeline (and sometimes a different severity) than the upstream project.
This is an Important flaw in Jupyter Notebook and JupyterLab, enabling a stored cross-site scripting (XSS) attack. An attacker can craft a malicious notebook that, with a single user click, can steal authentication tokens and fully compromise the Jupyter session, leading to arbitrary code execution and information…
| Product | Fixed in | Advisory |
|---|---|---|
| Red Hat Migration Toolkit for Applications 8.2 | mta/mta-solution-server-rhel9:1784109883 | RHSA-2026:43038 |
| Red Hat OpenShift AI 2.25 | rhoai/odh-workbench-jupyter-datascience-cpu-py312-rhel9:1788315638 | RHSA-2026:65126 |
| Red Hat OpenShift AI 3.4 | rhoai/odh-th06-cpu-torch210-py312-rhel9:1787076778 | RHSA-2026:60520 |
Frequently Asked Questions
Is CVE-2026-40171 in your dependencies?
O3 Security finds CVE-2026-40171 across npm, PyPI dependencies, including transitive ones, and its impact-aware SCA ranks findings by whether your code actually calls the vulnerable path.