Jupyter Notebook CVE-2026-40171
HIGHAttack ChainAIDerived
Hypothetical attack flow derived from CVE metadata – not a confirmed exploit chain
-
ReconCraft malicious .ipynb file with XSS payload
-
DeliveryDistribute via repository/email/forum
-
ExploitVictim opens notebook
-
InstallVictim clicks disguised UI element
-
C2JavaScript executes in browser
-
ExecuteToken harvested from session
-
ImpactAttacker calls Jupyter REST API
-
Step 8Full account takeover achieved
Vulnerability Assessment
| Weakness |
CWE
OWASP Top 10:2025
A05:2025 - Injection
ASVS 5.0
V1 - Encoding and Sanitization Output encoding, context-aware escaping
MITRE ATT&CK
2 techniques across 2 tactics: Initial Access, Execution The technique list with ATT&CK links and the kill-chain view is part of the Basic plan and up. |
| Exploitation Conditions | Exploitation requires the victim to open a malicious notebook file (.ipynb) in a vulnerable Jupyter Notebook (7.0.0-7.5.5) or JupyterLab (≤4.5.6) environment and perform a single click interaction with an attacker-crafted element that appears as a legitimate UI control. The vulnerability specifically requires the CommandLinker functionality to be enabled (default configuration) and the help extension components to be active. Successful exploitation requires that the victim's Jupyter instance has authentication tokens accessible to browser JavaScript context, which is standard in default deployments. Exploitation is LIMITED by: (1) mandatory user interaction - fully automated exploitation is not possible; (2) requirement that victims open untrusted notebook files, which security-aware organizations may restrict; (3) browser same-origin policy, though this is bypassed via the Jupyter API architecture; (4) potential detection by content security policies if configured. The vulnerability does NOT require the attacker to have existing network access to the victim's Jupyter server, as payload delivery occurs through the notebook file itself. |
| Impact | Real-world risk is HIGH for organizations where Jupyter notebooks are shared between users, downloaded from public repositories, or obtained via email/collaboration platforms. The attack requires user interaction (single click), which reduces automation potential but remains realistic in data science workflows where opening shared notebooks is routine. Without CVSS scoring, we assess using other signals: the vulnerability enables RCE through kernel access and terminal creation, making technical impact critical. The need for social engineering (victim must open malicious notebook) adds friction but is highly feasible in research and ML development contexts where notebook sharing is standard practice. NVIDIA AI Red Team's discovery suggests active reconnaissance of Jupyter environments by sophisticated threat actors. Exploitation is NOT automatable due to UI:R (user interaction required), but the single-click threshold is lower than typical phishing. No CISA KEV listing or EPSS score available, indicating targeted rather than widespread exploitation. Patch availability from vendor (Notebook 7.5.6, JupyterLab 4.5.7) and presence of workarounds (disabling help extensions) significantly reduce remediation complexity. Organizations that disable external notebook imports or run Jupyter in isolated environments face reduced risk, but multi-tenant Jupyter deployments or environments with untrusted notebook sources face immediate exposure. |
| Exploit ScenarioDerived | An attacker creates a malicious Jupyter notebook file containing crafted Markdown cells with embedded CommandLinker payloads disguised as legitimate UI elements (buttons, links, or interactive widgets). The attacker distributes this notebook via GitHub repositories, data science forums, email attachments, or collaboration platforms. When a victim opens the notebook in Jupyter Notebook 7.0.0-7.5.5 or JupyterLab ≤4.5.6 and clicks what appears to be a normal control element (e.g., 'View Results' button), the stored XSS payload executes, harvesting the user's authentication token. The attacker's script sends the token to an attacker-controlled server, then uses the Jupyter REST API to read sensitive datasets, modify code cells to inject backdoors, execute arbitrary Python code in running kernels, or spawn terminals for persistent shell access to the victim's environment. |
Get an e-mail when this CVE is exploited, patched or re-scored. Free account.
Alert meAnalysisAIv1 – Apr 30, 2026
Stored XSS in Jupyter Notebook's CommandLinker feature enables authentication token theft through malicious notebook files, leading to complete account takeover. Attackers craft notebook files with disguised controls that, when clicked once by victims, execute arbitrary code via the Jupyter REST API, granting full filesystem access and kernel control. Reported by NVIDIA AI Red Team. Vendor-released patches available: Jupyter Notebook 7.5.6 and JupyterLab 4.5.7. No public exploit code identified at time of analysis, but proof-of-concept demonstrated internally by NVIDIA researchers. This vulnerability targets data science and ML engineering environments where notebook sharing is common practice.
RemediationAI
Upgrade to Jupyter Notebook 7.5.6 or JupyterLab 4.5.7, which include patches that fix the CommandLinker sanitization flaw. For environments unable to immediately patch, disable the vulnerable help extensions via CLI commands: 'jupyter labextension disable @jupyter-notebook/help-extension' and 'jupyter labextension disable @jupyterlab/help-extension'. This workaround prevents exploitation but removes help functionality. As additional hardening in patched versions, administrators can disable the CommandLinker feature entirely by creating an overrides.json configuration file with: '{"@jupyterlab/apputils-extension:sanitizer": {"allowCommandLinker": false}}'. This defense-in-depth measure prevents future CommandLinker-based attacks but breaks legitimate use of commands in Markdown. For multi-user deployments, implement notebook content scanning before allowing user uploads, restrict notebook sources to trusted repositories only, and educate users on risks of opening notebooks from untrusted origins. Advisory and documentation available at https://github.com/jupyter/notebook/security/advisories/GHSA-rch3-82jr-f9w9 and https://jupyterlab.readthedocs.io/en/latest/user/commands.html#commands-in-markdown-output-and-files.
Affected Packages
Source: OSV (Open Source Vulnerabilities)
Affects your stack
Affects 4 packages in npm, pypi
Checking this CVE against your own stacks and servers is part of the Basic plan and up.
Technical ContextAI · show details
The vulnerability resides in the CommandLinker functionality within Jupyter Notebook's help extension components (@jupyter-notebook/help-extension and @jupyterlab/help-extension). CommandLinker allows Markdown output and files to embed executable commands, intended for legitimate UI automation. The CWE-79 stored XSS flaw occurs when malicious actors craft notebook files containing script payloads that the sanitizer fails to neutralize. When a victim opens the notebook and interacts with what appears to be normal UI elements, the payload executes in the browser context with the user's authentication token. Jupyter's architecture uses token-based authentication for its REST API, which controls kernels, filesystem operations, and terminal access. Successful exploitation leverages the fact that Jupyter runs a local web server where JavaScript can access authentication tokens stored in browser memory or cookies, then use those tokens to make authenticated API calls. Affected packages include both npm (JavaScript) and pip (Python) distributions, indicating the flaw spans the front-end rendering layer.
Know when Nvidia gets its next vulnerability
- Watch products and get an email when something new is published
- Check this CVE against your own stack and servers
- Exploit and PoC references, threat intelligence from 22 sources
No credit card · 7-day full trial
Severity by source
CVSS:4.0/AV:N/AC:L/AT:N/PR:H/UI:A/VC:H/VI:H/VA:H/SC:N/SI:N/SA:N
Primary rating from Vendor (https://github.com/jupyter/notebook).
CVSS VectorVendor: https://github.com/jupyter/notebook
Lifecycle Timeline
2DescriptionCVE.org
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-extensionHardening
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
Blast Radius
ecosystem impact- 8 pypi packages depend on jupyterlab (2 direct, 6 indirect)
- 2 pypi packages depend on notebook (2 direct, 0 indirect)
Ecosystem-wide dependent count for version 4.5.7 and other introduced versions.
Executive ViewAI
CVE-2026-40171 is a stored cross-site scripting vulnerability in Jupyter Notebook's CommandLinker feature that allows attackers to steal authentication tokens and achieve complete account takeover through malicious notebook files. Data science and ML engineering teams face immediate risk when opening untrusted notebooks, as a single click on disguised controls can compromise user credentials, grant filesystem access, and enable arbitrary code execution on systems containing sensitive datasets and intellectual property.
Vendor-released patch: Jupyter Notebook 7.5.6 and JupyterLab 4.5.7. If immediate patching is not feasible, restrict notebook file access to internal, version-controlled repositories only; disable REST API access for non-privileged accounts; implement network segmentation to isolate Jupyter environments; and enforce multi-factor authentication for all Jupyter access until patches are deployed.
Threat Intelligence Overview
How this decision was reached
The engine reads each signal below and applies a fixed list of rules from top to bottom. The first rule that matches sets the recommended action – like a statement, every line is shown.
What every action level means
SSVC AssessmentENISA
Priority Score
Attack Technique
Cross-Site Scripting occurs when an application accepts untrusted data and sends it to a web browser without proper validation or encoding.
Remote Code Execution represents the critical moment when an attacker successfully runs arbitrary code on a target system without physical access.
Affected Products (CPE)CVE.org
Heap-based buffer overflow in dnsmasq before 2.78 allows remote attackers to cause a denial of service (crash) or execut
Systems with microprocessors utilizing speculative execution and speculative execution of memory reads before the addres
The NVIDIA driver in the Graphics Drivers subsystem in Apple OS X before 10.11.4 allows attackers to execute arbitrary c
The NVIDIA driver before 307.78, and Release 310 before 311.00, in the NVIDIA Display Driver service on Windows does not
NVIDIA Windows GPU Display Driver (all versions) contains a vulnerability in DirectX drivers, in which a specially craft
Authentication bypass in NVIDIA Triton Inference Server allows unauthenticated remote attackers to reach protected funct
NVIDIA Windows GPU Display Driver (all versions) contains a vulnerability in DirectX drivers, in which a specially craft
NVIDIA Container Toolkit for Linux contains a Time-of-Check Time-of-Use (TOCTOU) vulnerability when used with default co
For the NVIDIA Quadro, NVS, and GeForce products, NVIDIA GeForce Experience R340 before GFE 2.11.4.125 and R375 before G
The native Bluetooth stack in the Linux Kernel (BlueZ), starting at the Linux kernel version 2.6.32 and up to and includ
The NVIDIA Graphics Drivers subsystem in Apple OS X before 10.11.5 allows attackers to execute arbitrary code in a privi
NVIDIA Container Toolkit 1.16.1 or earlier contains a Time-of-check Time-of-Use (TOCTOU) vulnerability when used with de
Same weakness CWE-79 – Cross-site Scripting (XSS)
View allVendor StatusVendor
SUSE
Severity: High| Product | Status |
|---|---|
| openSUSE Tumbleweed | Fixed |
GHSA-rch3-82jr-f9w9
NVD
CVE.org
EPSS
Exploit-DB