8.6high
jupyterlab: Command linker attributes in HTML enable one-click command execution from untrusted content
- Severity
- 8.6high CVSS:4.0 by GitHub_M
- Exploit likelihood
- 0.49% (higher than 43% of CVEs; EPSS, by FIRST)
- Published
- Last changed
- Assigned by
- GitHub_M
- Also known as
- GHSA-mqcg-5x36-vfcgBIT-JUPYTER-BASE-NOTEBOOK-2026-42557BIT-JUPYTER-NOTEBOOK-2026-42557BIT-JUPYTERLAB-2026-42557PYSEC-2026-2537PYSEC-2026-2681
Description
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.
Affected
| Product or package | Versions | Reported by |
|---|---|---|
| jupyterlab jupyterlab | < 4.5.7 | CVE List |
| jupyter notebook | >= 7.0.0, < 7.5.6, from 7.0.0 before 7.5.6 | CVE List, NVD |
| mta/mta-solution-server-rhel9 | Not specified Not affected: from 1784109883 before * | CVE List |
| rhoai/odh-th06-cpu-torch210-py312-rhel9 | Not specified Not affected: from 1787076778 before * | CVE List |
| rhoai/odh-th06-cuda130-torch210-py312-rhel9 | Not specified Not affected: from 1787077779 before * | CVE List |
| rhoai/odh-th06-rocm64-torch291-py312-rhel9 | Not specified Not affected: from 1787076481 before * | CVE List |
| rhoai/odh-workbench-jupyter-datascience-cpu-py312-rhel9 | Not specified Not affected: from 1787074331 before * | CVE List |
| rhoai/odh-workbench-jupyter-minimal-cpu-py312-rhel9 | Not specified Not affected: from 1787073913 before * | CVE List |
| rhoai/odh-workbench-jupyter-minimal-cuda-py312-rhel9 | Not specified Not affected: from 1787074078 before * | CVE List |
| rhoai/odh-workbench-jupyter-minimal-rocm-py312-rhel9 | Not specified Not affected: from 1787073929 before * | CVE List |
| rhoai/odh-workbench-jupyter-pytorch-cuda-py312-rhel9 | Not specified Not affected: from 1787073605 before * | CVE List |
| rhoai/odh-workbench-jupyter-pytorch-rocm-py312-rhel9 | Not specified Not affected: from 1787073546 before * | CVE List |
| rhoai/odh-workbench-jupyter-tensorflow-cuda-py312-rhel9 | Not specified Not affected: from 1787073717 before * | CVE List |
| rhoai/odh-workbench-jupyter-tensorflow-rocm-py312-rhel9 | Not specified Not affected: from 1787073713 before * | CVE List |
| rhoai/odh-workbench-jupyter-trustyai-cpu-py312-rhel9 | Not specified Not affected: from 1787073593 before * | CVE List |
| rhoai/odh-th06-cpu-torch291-py312-rhel9 | Not specified | CVE List |
| rhoai/odh-th06-cuda130-torch291-py312-rhel9 | Not specified | CVE List |
| rhoai/odh-workbench-jupyter-pytorch-llmcompressor-cuda-py312-rhel9 | Not specified | CVE List |
| jupyterlab (PyPI) | before 4.5.7 | GitHub Advisory Database, PyPA Advisory Database |
| notebook (PyPI) | from 7.0.0 before 7.5.6 | GitHub Advisory Database, PyPA Advisory Database |
| jupyter jupyterlab | before 4.5.7 | NVD |
| jupyter-base-notebook (Bitnami) | from 7.0.0 before 7.5.6 | Bitnami Vulnerability Database |
| jupyter-notebook (Bitnami) | from 7.0.0 before 7.5.6 | Bitnami Vulnerability Database |
| jupyterlab (Bitnami) | before 4.5.7 | Bitnami Vulnerability Database |
All scores
| GitHub_M | 8.6high CVSS:4.0 | 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 |
| redhat-SADP | 8.8high CVSS:3.1 | CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:H |
| GitHub | 9.6high CVSS:3.1 | CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:H/I:H/A:H |
| GitHub | high CVSS:4.0 | 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 |
| NVD | 9.6critical CVSS:3.1 | CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:H/I:H/A:H |
| PyPA Advisory Database | 9.6critical CVSS:3.1 | CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:H/I:H/A:H |
| PyPA Advisory Database | Not scored CVSS:4.0 | 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 |
| Bitnami Vulnerability Database | critical rating |
Classification
SSVC (CISA-ADP): exploitation none, automatable no, technical impact total.
What each source says
CVE List
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.
GitHub Advisory Database
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
NVD (es)
jupyterlab es un entorno extensible para computación interactiva y reproducible, basado en la Arquitectura de Jupyter Notebook. Antes de la versión 4.5.7, el saneador HTML de JupyterLab permite data-commandlinker-command y data-commandlinker-args en elementos de botón, mientras que CommandLinker escucha todos los eventos de clic en document.body y ejecuta el comando nombrado sin verificar si el elemento provino de la interfaz de usuario (UI) confiable de JupyterLab. Un cuaderno con una salida de celda HTML preguardada que contiene un botón engañoso puede activar comandos arbitrarios de JupyterLab - incluyendo ejecución de código arbitrario - con un solo clic del usuario, sin que el usuario envíe ningún código para su ejecución. Esta vulnerabilidad está corregida en la versión 4.5.7.
References
| https://github.com/jupyterlab/jupyterlab/security/advisories/GHSA-mqcg-5x36-vfcg | advisory, mitigation, vendor-advisory, web | |
| https://access.redhat.com/security/cve/CVE-2026-42557 | vdb-entry, web | |
| https://bugzilla.redhat.com/show_bug.cgi?id=2477086 | issue-tracking, web | |
| https://security.access.redhat.com/data/csaf/v2/vex/2026/cve-2026-42557.json | web | |
| https://access.redhat.com/errata/RHSA-2026:43038 | vendor-advisory, web | |
| https://access.redhat.com/errata/RHSA-2026:60520 | vendor-advisory, web | |
| https://nvd.nist.gov/vuln/detail/CVE-2026-42557 | advisory, web | |
| https://github.com/jupyterlab/jupyterlab | package | |
| https://jupyterlab.readthedocs.io/en/latest/user/commands.html#commands-in-markdown-files | web | |
| https://pypi.org/project/jupyterlab | package | |
| https://github.com/advisories/GHSA-mqcg-5x36-vfcg | advisory | |
| https://pypi.org/project/notebook | package | |
Sources
| Source | Record | Licence |
|---|---|---|
| CVE List | CVE-2026-42557 changed 2026-08-28 | CVE Terms of Use |
| GitHub Advisory Database | GHSA-mqcg-5x36-vfcg changed 2026-09-10 | CC-BY-4.0 |
| NVD | CVE-2026-42557 changed 2026-10-25 | Public domain |
| PyPA Advisory Database | PYSEC-2026-2537 changed 2026-07-13 | CC-BY-4.0 |
| PyPA Advisory Database | PYSEC-2026-2681 changed 2026-07-13 | CC-BY-4.0 |
| Bitnami Vulnerability Database | BIT-JUPYTER-BASE-NOTEBOOK-2026-42557 changed 2026-09-10 | Apache-2.0 |
| Bitnami Vulnerability Database | BIT-JUPYTER-NOTEBOOK-2026-42557 changed 2026-09-10 | Apache-2.0 |
| Bitnami Vulnerability Database | BIT-JUPYTERLAB-2026-42557 changed 2026-09-10 | Apache-2.0 |