CVE-2026-42557: jupyterlab: Command linker attributes in HTML enable one-click command execution from untrusted content

Published May 6, 2026
·
Updated

jupyterlab is an extensible environment for interactive and reproducible computing, based on the Jupyter Notebook Architecture. Prior to 4.5.7, 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. This vulnerability is fixed in 4.5.7.

Other sources

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

GitHub

Affected Software

5 affected componentsFixes available
pip/notebook>=7.0.0<=7.5.5
7.5.6
pip/jupyterlab<=4.5.6
4.5.7
jupyter JupyterLab<4.5.7
jupyter notebook>=7.0.0<7.5.6
IBM API Connect V12 OnPrem<=All

Remediation

Recommended actions to resolve this vulnerability, in priority order.

  1. Upgrade

    Upgrade pip/notebook to a version that resolves this vulnerability.

    Fixed in 7.5.6
  2. Upgrade

    Upgrade pip/jupyterlab to a version that resolves this vulnerability.

    Fixed in 4.5.7
  3. Upgrade

    Upgrade jupyterlab to a version that resolves this vulnerability.

    Fixed in 4.5.7
  4. Configuration

    Disable the CommandLinker functionality (e.g., set allowCommandLinker to false / use overrides.json to disable command linker), since the vulnerability is fixed in 4.5.7 and the patched versions include a toggle to disable the command linker functionality altogether.

    JupyterLab CommandLinker allowCommandLinker = false

Event History

May 6, 2026
Advisory Published
via GitHub·09:43 PM
Data Sourced
via GitHub·09:43 PM
DescriptionWeaknessAffected Software
May 13, 2026
CVE Published
via MITRE·03:06 PM
Data Sourced
via MITRE·03:06 PM
DescriptionWeakness
Data Sourced
via Red Hat·04:03 PM
DescriptionSeverityAffected Software
Data Sourced
via NVD·04:16 PM
DescriptionSeverityWeaknessAffected Software
Jul 7, 2026
Data Sourced
via IBM·12:00 AM
DescriptionAffected Software

Parent advisories

This vulnerability appears in the following advisories.

Free Weekly Intel

Don't miss critical vulnerabilities

Join thousands of security professionals who receive our weekly digest of trending CVEs, zero-days, and exploited vulnerabilities.

No spam. Unsubscribe anytime.

Frequently Asked Questions

1

What is the severity of CVE-2026-42557?

CVE-2026-42557 has a critical severity level due to its ability to execute commands without proper trust checks.

2

How do I fix CVE-2026-42557?

To fix CVE-2026-42557, update JupyterLab to version 4.5.7 or later and Notebook to version 7.5.6 or later.

3

Which versions are affected by CVE-2026-42557?

CVE-2026-42557 affects JupyterLab versions up to 4.5.6 and Notebook versions between 7.0.0 and 7.5.5.

4

What impact does CVE-2026-42557 have on JupyterLab users?

CVE-2026-42557 can potentially allow unauthorized command execution, posing a risk of malicious actions within the JupyterLab environment.

5

Is there an exploit for CVE-2026-42557?

Currently, there are no publicly disclosed exploits for CVE-2026-42557, but the vulnerability's nature suggests it could be exploited if not patched.

Contact

SecAlerts Pty Ltd.
132 Wickham Terrace
Fortitude Valley,
QLD 4006, Australia
info@secalerts.co
By using SecAlerts services, you agree to our services end-user license agreement. This website is safeguarded by reCAPTCHA and governed by the Google Privacy Policy and Terms of Service. All names, logos, and brands of products are owned by their respective owners, and any usage of these names, logos, and brands for identification purposes only does not imply endorsement. If you possess any content that requires removal, please get in touch with us.
© 2026 SecAlerts Pty Ltd.
ABN: 70 645 966 203, ACN: 645 966 203