High

JupyterLab's command linker attributes in HTML enable one-click command execution from untrusted content

  • Disclosed: 06.05.2026
  • Updated: 11.10.2026 15:17

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:

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

Resources

Affected software

Click a technology to see all vulnerabilities affecting it.

PlatformPackageVulnerable versionsFixed in
Python (PyPI) jupyterlab < 4.5.7 4.5.7
Python (PyPI) notebook >= 7.0.0, < 7.5.6 7.5.6

References

CVSS score 9.6/10
CVSS vector
CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:H/I:H/A:H
Weakness (CWE)
CWE-79
Platform
Python (PyPI)
Package
jupyterlab, notebook
Disclosed
06.05.2026
Updated
11.10.2026 15:17

Sources and licenses

OSV / GitHub Advisory Database - PYSEC-2026-2537 - PyPA Advisory Database; CC BY 4.0

OSV / GitHub Advisory Database - PYSEC-2026-2681 - PyPA Advisory Database; CC BY 4.0

OSV / GitHub Advisory Database - GHSA-mqcg-5x36-vfcg - CC BY 4.0

Vulnerability history: notebook

All published vulnerabilities of this package (Python (PyPI)), newest first. Shows whether this is a one-off slip or a package that needs watching.

All (21) in the archive
Total entries
21
First → latest
09.2015 10.2026
Without a fix
0
Exploited in attacks
0

Severity breakdown

  • Critical 1
  • High 8
  • Medium 11
  • Low 1

Disclosures per year

  1. 2017: 0
  2. 2018: 3
  3. 2019: 4
  4. 2020: 1
  5. 2021: 2
  6. 2022: 2
  7. 2023: 0
  8. 2024: 3
  9. 2025: 0
  10. 2026: 4

earlier: 2

Severity:
  1. JupyterLab's command linker attributes in HTML enable one-click command execution from untrusted content this entry
    High · 9.6 CVE-2026-42557 >= 7.0.0, < 7.5.6 7.5.6
  2. High · 7.6 CVE-2024-43805 >= 7.0.0, < 7.2.2 7.2.2
  3. High · 7.6 CVE-2024-22421 >= 7.0.0, < 7.0.7 7.0.7
  4. High · 10.0 CVE-2021-32798 < 5.7.11, >= 6.0.0, < 6.4.1 5.7.11, 6.4.1
  5. Critical · 9.8 CVE-2015-7337 >= 4.0.0, < 4.0.5 4.0.5

Know which vulnerabilities affect your application

With the DockRay integration and software inventory enabled, DockRay checks reported component versions against known vulnerabilities and notifies you about confirmed matches. Coverage depends on the supported technology and available advisory data.

Connect your application
DockRay newsletter

Application security in your inbox

Important vulnerabilities, actionable guidance and practical advice for your applications. Choose your technologies and follow what matters to your project.

  • A daily digest of new vulnerabilities, critical ones included.
  • Notifications about important updates.
  • Practical advice on application security and monitoring.

Leave empty to receive updates for every technology.

Free to subscribe. Unsubscribe with one click in any email.