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
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-extension
Hardening
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
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.