Skip to main content

JupyterLab CVE-2026-42557

HIGH
Cross-site Scripting (XSS) (CWE-79)
2026-05-06 https://github.com/jupyterlab/jupyterlab GHSA-mqcg-5x36-vfcg
8.6
CVSS 4.0 · Vendor: https://github.com/jupyterlab/jupyterlab
View

Attack ChainAIDerived

Hypothetical attack flow derived from CVE metadata – not a confirmed exploit chain

  1. Recon
    Craft malicious notebook with CommandLinker payload
  2. Delivery
    Distribute via GitHub/email/Binder
  3. Exploit
    Victim opens notebook file
  4. Install
    HTML renders deceptive button
  5. C2
    User clicks button
  6. Execute
    CommandLinker executes arbitrary command
  7. Impact
    Code 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.

This Week Schedule remediation this week. Why: HIGH severity (CVSS 7.0-8.9).
Patch available 0.1% exploitation probability (EPSS)

Get an e-mail when this CVE is exploited, patched or re-scored. Free account.

Alert me

AnalysisAIv1 – 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

pypi jupyterlab fix: 4.5.7
pypi notebook fix: 7.5.6

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

Vendor (https://github.com/jupyterlab/jupyterlab) PRIMARY 8.6 HIGH
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
Red Hat 8.8 HIGH

Primary rating from Vendor (https://github.com/jupyterlab/jupyterlab).

CVSS VectorVendor: https://github.com/jupyterlab/jupyterlab

Attack Vector
Network
Attack Complexity
Low
Attack Requirements
None
Privileges Required
None
User Interaction
Active
Vulnerable system: Confidentiality
High
Vulnerable system: Integrity
High
Vulnerable system: Availability
High
Subsequent system: Confidentiality
None
Subsequent system: Integrity
None
Subsequent system: Availability
None

Lifecycle Timeline

2
CVSS changed
May 13, 2026 - 16:22 NVD
8.6 (HIGH)
CVE Published
May 06, 2026 - 21:43 nvd
HIGH

DescriptionCVE.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:

json
{
  "@jupyterlab/apputils-extension:sanitizer": {
    "allowCommandLinker": false
  }
}

Resources

  • https://jupyterlab.readthedocs.io/en/latest/user/commands.html#commands-in-markdown-files

Executive ViewAI

Why It Matters

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.

Business Impact: High
Compensating Controls

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

EPSS Score
0.1%
Top 77% exploitable
Threat Intel
1
1 source
Data Quality
6 sources
Confidence: High
NVD CVE.org EPSS GHSA Vendor GitHub VulDB

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.

SignalValue
Severity HIGH
CISA KEV No
Public POC No
EPSS 0.1%
Patch available Yes
Active threat No
Deciding rule
HIGH severity (CVSS 7.0-8.9)
What every action level means
Emergency Immediate action required. Criteria: CRITICAL + in CISA KEV (actively exploited) without patch, OR CRITICAL + EPSS > 30% without patch, OR CRITICAL + active threat signals without patch.
Act Now Prioritize within 24-48h. Criteria: in KEV with patch available, OR CRITICAL + public POC, OR HIGH + EPSS > 10%, OR CRITICAL + active threat, OR any CRITICAL severity.
This Week Schedule remediation this week. Criteria: HIGH severity (CVSS 7.0-8.9). Patch within normal change window.
This Month Plan within 30 days. Criteria: MEDIUM severity (CVSS 4.0-6.9), lower exploitation probability. Include in regular patch cycle.
Monitor Track and reassess. Criteria: LOW severity (CVSS 0.1-3.9), minimal exploitation risk. No immediate action needed.

SSVC AssessmentENISA

SSVC Decision· derived
Scheduled
Exploitation· derived
None
System Exposure· derived
Open
Automatable· derived
No
Human Impact
High

Priority Score

43
Low Medium High Critical
KEV: 0
EPSS: 0
CVSS: +43
PoC: 0
Weaponized: 0
Threat intel: 0
Gov advisory: 0

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

pkg:pip/jupyterlab
pkg:pip/notebook

Vendor StatusVendor

SUSE

Product Status
openSUSE Tumbleweed Fixed

This site uses cookies essential for authentication and security. No tracking or analytics cookies are used. Privacy Policy