JupyterLab CVE-2026-42557
HIGHAttack ChainAIDerived
Hypothetical attack flow derived from CVE metadata – not a confirmed exploit chain
-
ReconCraft malicious notebook with CommandLinker payload
-
DeliveryDistribute via GitHub/email/Binder
-
ExploitVictim opens notebook file
-
InstallHTML renders deceptive button
-
C2User clicks button
-
ExecuteCommandLinker executes arbitrary command
-
ImpactCode runs in kernel or files deleted silently
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 | Requires victim to open a malicious .ipynb notebook file or Markdown document in vulnerable JupyterLab/Notebook versions and click on an embedded HTML button element containing data-commandlinker-command attributes. The malicious content must be delivered through notebook sharing mechanisms such as email attachments, GitHub/GitLab repositories, version control systems, public Binder links, or collaborative notebook platforms. No kernel initialization is required - the HTML payload is stored in the notebook JSON structure and renders immediately upon file open. Single-click attacks work across all browsers and operating systems. Multi-click terminal takeover variant requires Chromium-based browser (Chrome, Edge, Brave) and either pre-granted clipboard permissions or victim granting clipboard access during the attack sequence. The victim must have permissions to execute commands in available kernel contexts or terminal environments for full impact realization. Attack surface expands in deployments with third-party JupyterLab extensions that register additional commands accessible through the CommandLinker mechanism. |
| Impact | High real-world risk despite missing CVSS score due to confirmed single-click remote code execution capability through common collaboration workflows (email attachments, GitHub repository notebooks, Binder links). The attack requires no authentication, no active kernel, and minimal user interaction (single click on visually deceptive UI element indistinguishable from legitimate widgets). While classified as CWE-79, the impact significantly exceeds traditional XSS - attackers gain arbitrary code execution in kernel context, silent file deletion capability, and resource exhaustion vectors in multi-tenant jupyter-server deployments. The attack is automatable through crafted .ipynb file distribution but requires social engineering (convincing click), moderating widespread exploitation probability. JupyterHub deployments show reduced but non-zero impact on availability. Chromium browser users face elevated risk from multi-click terminal takeover scenarios. Exploitation is immediately visible for code execution but silent for file deletion, complicating detection. Third-party extension ecosystems expand attack surface unpredictably. Vendor-released patch in 4.5.7/7.5.6 enables full remediation, with configuration-based hardening option (allowCommandLinker toggle) available for defense-in-depth. No public exploit code confirmed at time of analysis, but proof-of-concept construction is trivial given detailed GitHub advisory. Prioritize patching for any deployment accepting notebooks from external sources or untrusted collaborators. |
| Exploit ScenarioDerived | An attacker crafts a Jupyter notebook (.ipynb file) containing a pre-saved HTML output cell with a button labeled 'Run Analysis' or 'Download Results' that includes data-commandlinker-command='terminal:create' and data-commandlinker-args with malicious command payloads. The attacker shares this notebook via GitHub repository, email attachment, or public Binder link targeting data science teams. When a victim opens the notebook in JupyterLab 4.5.6 or earlier, the HTML renders immediately without kernel startup, displaying the deceptive button visually identical to legitimate JupyterLab widgets. A single click executes the attacker-specified command - creating a terminal session running rm -rf sensitive_data/ for silent file deletion, or launching a Python kernel executing os.system() calls for reverse shell establishment. No code execution dialog appears because the CommandLinker bypasses normal notebook execution flows. |
Get an e-mail when this CVE is exploited, patched or re-scored. Free account.
Alert meAnalysisAIv1 – May 06, 2026
JupyterLab's CommandLinker executes arbitrary commands via single-click social engineering when users open malicious notebooks shared through email, GitHub, or Binder links. Attackers embed deceptive HTML buttons with allowlisted data-commandlinker-* attributes in pre-saved notebook output cells to trigger commands without code execution submission, enabling immediate arbitrary code execution in available kernels, silent file deletion, or resource exhaustion in multi-tenant deployments. The patched version 4.5.7 was released by the JupyterLab team through GitHub advisory GHSA-mqcg-5x36-vfcg. Chromium browser users face expanded terminal access risk through multi-click clipboard permission abuse. Third-party JupyterLab extensions increase attack surface by exposing additional commands to exploitation.
RemediationAI
Upgrade to JupyterLab 4.5.7 or Jupyter Notebook 7.5.6 as released by the vendor through GitHub advisory GHSA-mqcg-5x36-vfcg. For environments requiring immediate mitigation before patching, disable CommandLinker functionality by adding overrides.json configuration: {"@jupyterlab/apputils-extension:sanitizer": {"allowCommandLinker": false}} in the JupyterLab settings directory, though this breaks legitimate command linker features in documentation and Markdown files. Downstream application developers can disable the vulnerable component by passing commandLinker: new CommandLinker({ commands: new CommandRegistry() }) in JupyterFrontEnd initialization options. After patching, consider enabling the allowCommandLinker: false hardening toggle as defense-in-depth if command linker functionality is not actively used in your deployment. Organizations should audit existing notebook repositories for suspicious HTML button elements containing data-commandlinker-command attributes and review recent file deletion activity for potential silent exploitation. Multi-tenant deployments should prioritize patching due to resource exhaustion and cross-user availability impact. No effective end-user workarounds exist beyond avoiding opening notebooks from untrusted sources.
Affected Packages
Source: OSV (Open Source Vulnerabilities)
Affects your stack
Affects 2 packages in pypi
Checking this CVE against your own stacks and servers is part of the Basic plan and up.
Technical ContextAI · show details
JupyterLab's CommandLinker component registers a global click event listener on document.body to process data-commandlinker-command and data-commandlinker-args attributes on button elements, enabling legitimate in-app command invocation from documentation and UI. The HTML sanitizer incorrectly allowlists these attributes on user-controlled content rendered from notebook output cells and Markdown files without origin validation. This creates a DOM-based command injection vector classified under CWE-79 (Cross-site Scripting), though the impact extends beyond traditional XSS to arbitrary command execution within the JupyterLab runtime environment. The vulnerability affects pkg:pip/jupyterlab (all versions through 4.5.6) and pkg:pip/notebook (versions 7.0.0 through 7.5.5), which share the underlying frontend architecture. Unlike typical stored XSS requiring server-side persistence, malicious payloads are embedded directly in .ipynb JSON files distributed through version control, email attachments, or public notebook repositories, executing immediately upon file open without kernel initialization.
Know when the next one hits your stack
- 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:N/UI:A/VC:H/VI:H/VA:H/SC:N/SI:N/SA:N
Primary rating from Vendor (https://github.com/jupyterlab/jupyterlab).
CVSS VectorVendor: https://github.com/jupyterlab/jupyterlab
Lifecycle Timeline
2DescriptionCVE.org
JupyterLab's HTML sanitizer allowlists data-commandlinker-command and data-commandlinker-args on button elements, while CommandLinker listens for all click events on document.body and executes the named command without checking whether the element came from trusted JupyterLab UI. A notebook with a pre-saved HTML cell output containing a deceptive button can trigger arbitrary JupyterLab commands - including arbitrary code execution - on a single user click, without any code being submitted for execution by the user.
Impact
An attacker who shares a notebook or a Markdown file - via email, GitHub, or a Binder link - can invoke an arbitrary command upon a single click by the victim. The button can be rendered inside the output area and be visually indistinguishable from a legitimate widget. No kernel needs to start; the HTML output is stored in the notebook file and displayed immediately on open.
Single-click impact
An attacker convincing the victim to click on a single button or link can:
- execute arbitrary code in the available kernels,
- delete files leading to information loss; in principle the loss could be unrecoverable, depending on server configuration and attack complexity,
- open multiple kernels/terminals at once, or create multiple files at once, putting significant stress on the server and thus deny availability for other users when using standalone multi-tenant jupyter-server deployment, and to a lesser degree impact availability on JupyterHub deployments.
The arbitrary code execution will be immediately visible to the user; and can be halted by the timely user intervention. The deletion of files can be silent and go unnoticed for some time.
Multi-click attacks
An attacker who convinces the victim to click on multiple buttons in specific order and to grant access to clipboard (or in scenarios where the user already granted keyboard access) can obtain full access to the terminal and execute arbitrary commands in the environment with access scope that might exceed that of available kernels. Only users of Chromium-based browsers are susceptible to this expanded variant of the attack.
The execution of commands in the terminal would be immediately visible to the user.
Impact of third-party extensions
The impact described above assumes a plain JupyterLab/Notebook installation. In environments with frontend extensions that contribute additional commands the attack surface is increased by the functionality covered by these commands.
Patches
JupyterLab 4.5.7
Workarounds
No workarounds are available for end-users.
Downstream applications inheriting from JupyterFrontEnd or JupyterLab can effectively disable the CommandLinker by passing commandLinker: new CommandLinker({ commands: new CommandRegistry() }) option in the initialization options.
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-files
Executive ViewAI
CVE-2026-42557 allows attackers to execute arbitrary commands in JupyterLab through malicious notebook files shared via email, GitHub, or Binder, requiring only a single user click to trigger code execution without entering a notebook code cell. Organizations using JupyterLab for data science, research, or collaborative development face immediate risk of unauthorized code execution, data exfiltration, and system compromise when users open untrusted notebooks, particularly in multi-tenant or shared infrastructure environments.
No vendor-released patch identified at time of analysis. Interim mitigations: disable or restrict JupyterLab access to trusted users only; block external notebook sharing via email and web links; implement network-based restrictions on kernel command execution; monitor for suspicious command invocations in JupyterLab audit logs; remove or disable third-party extensions that expose additional commands to CommandLinker exploitation. Note: Monitor GitHub advisory GHSA-mqcg-5x36-vfcg for patched version availability and apply immediately upon release.
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
Same weakness CWE-79 – Cross-site Scripting (XSS)
View allVendor StatusVendor
SUSE
| Product | Status |
|---|---|
| openSUSE Tumbleweed | Fixed |
GHSA-mqcg-5x36-vfcg
NVD
CVE.org
EPSS
VulDB
Exploit-DB