{"id":"CVE-2026-42557","aliases":["CVE-2026-42557","GHSA-mqcg-5x36-vfcg","BIT-JUPYTER-BASE-NOTEBOOK-2026-42557","BIT-JUPYTER-NOTEBOOK-2026-42557","BIT-JUPYTERLAB-2026-42557","PYSEC-2026-2537","PYSEC-2026-2681"],"related":[],"kind":"vulnerability","state":"published","title":"jupyterlab: Command linker attributes in HTML enable one-click command execution from untrusted content","summary":"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.","summarySource":"cvelist","descriptions":[{"lang":"en","text":"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.","source":"cvelist"},{"lang":"en","text":"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.\n\n### Impact\n\nAn 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.\n\n#### Single-click impact\n\nAn attacker convincing the victim to click on a single button or link can:\n- execute arbitrary code in the available kernels,\n- delete files leading to information loss; in principle the loss could be unrecoverable, depending on server configuration and attack complexity,\n- 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.\n\nThe 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.\n\n#### Multi-click attacks\n\nAn 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.\n\nThe execution of commands in the terminal would be immediately visible to the user.\n\n#### Impact of third-party extensions\n\nThe 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.\n\n### Patches\n\nJupyterLab 4.5.7\n\n### Workarounds\n\nNo workarounds are available for end-users.\n\nDownstream applications inheriting from `JupyterFrontEnd` or `JupyterLab` can effectively disable the `CommandLinker` by passing `commandLinker: new CommandLinker({ commands: new CommandRegistry() })` option in the initialization options.\n\n### Hardening\n\nThe patched versions include a toggle to disable the command linker functionality altogether, for example via `overrides.json`:\n\n```json\n{\n  \"@jupyterlab/apputils-extension:sanitizer\": {\n    \"allowCommandLinker\": false\n  }\n}\n```\n\n### Resources\n\n- https://jupyterlab.readthedocs.io/en/latest/user/commands.html#commands-in-markdown-files","format":"markdown","source":"ghsa"},{"lang":"es","text":"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.","source":"nvd"}],"published":"2026-05-06T21:43:44.000Z","modified":"2026-10-25T23:10:00.167Z","severity":{"scorer":"GitHub_M","scheme":"CVSS:4.0","vector":"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","score":8.6,"rating":"HIGH"},"severities":[{"scorer":"GitHub_M","scheme":"CVSS:4.0","vector":"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","score":8.6,"rating":"HIGH"},{"scorer":"redhat-SADP","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:H","score":8.8,"rating":"HIGH"},{"scorer":"GitHub","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:H/I:H/A:H","score":9.6,"rating":"HIGH"},{"scorer":"GitHub","scheme":"CVSS:4.0","vector":"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","rating":"HIGH"},{"scorer":"NVD","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:H/I:H/A:H","score":9.6,"rating":"CRITICAL"},{"scorer":"PyPA Advisory Database","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:H/I:H/A:H","score":9.6,"rating":"CRITICAL"},{"scorer":"PyPA Advisory Database","scheme":"CVSS:4.0","vector":"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"},{"scorer":"Bitnami Vulnerability Database","scheme":"rating","rating":"CRITICAL"}],"cwes":["CWE-79"],"affected":[{"ranges":[{"version":"< 4.5.7","status":"affected"}],"vendor":"jupyterlab","product":"jupyterlab","source":"cvelist"},{"ranges":[{"version":">= 7.0.0, < 7.5.6","status":"affected"}],"vendor":"jupyter","product":"notebook","source":"cvelist"},{"ranges":[{"type":"rpm","introduced":"1784109883","fixed":"*","status":"unaffected"}],"vendor":"Red Hat","product":"Red Hat Migration Toolkit for Applications 8.2","package":"mta/mta-solution-server-rhel9","cpe":"cpe:/a:redhat:migration_toolkit_applications:8.2::el9","source":"cvelist"},{"ranges":[{"type":"rpm","introduced":"1787076778","fixed":"*","status":"unaffected"}],"vendor":"Red Hat","product":"Red Hat OpenShift AI 3.4","package":"rhoai/odh-th06-cpu-torch210-py312-rhel9","cpe":"cpe:/a:redhat:openshift_ai:3.4::el9","source":"cvelist"},{"ranges":[{"type":"rpm","introduced":"1787077779","fixed":"*","status":"unaffected"}],"vendor":"Red Hat","product":"Red Hat OpenShift AI 3.4","package":"rhoai/odh-th06-cuda130-torch210-py312-rhel9","cpe":"cpe:/a:redhat:openshift_ai:3.4::el9","source":"cvelist"},{"ranges":[{"type":"rpm","introduced":"1787076481","fixed":"*","status":"unaffected"}],"vendor":"Red Hat","product":"Red Hat OpenShift AI 3.4","package":"rhoai/odh-th06-rocm64-torch291-py312-rhel9","cpe":"cpe:/a:redhat:openshift_ai:3.4::el9","source":"cvelist"},{"ranges":[{"type":"rpm","introduced":"1787074331","fixed":"*","status":"unaffected"}],"vendor":"Red Hat","product":"Red Hat OpenShift AI 3.4","package":"rhoai/odh-workbench-jupyter-datascience-cpu-py312-rhel9","cpe":"cpe:/a:redhat:openshift_ai:3.4::el9","source":"cvelist"},{"ranges":[{"type":"rpm","introduced":"1787073913","fixed":"*","status":"unaffected"}],"vendor":"Red Hat","product":"Red Hat OpenShift AI 3.4","package":"rhoai/odh-workbench-jupyter-minimal-cpu-py312-rhel9","cpe":"cpe:/a:redhat:openshift_ai:3.4::el9","source":"cvelist"},{"ranges":[{"type":"rpm","introduced":"1787074078","fixed":"*","status":"unaffected"}],"vendor":"Red Hat","product":"Red Hat OpenShift AI 3.4","package":"rhoai/odh-workbench-jupyter-minimal-cuda-py312-rhel9","cpe":"cpe:/a:redhat:openshift_ai:3.4::el9","source":"cvelist"},{"ranges":[{"type":"rpm","introduced":"1787073929","fixed":"*","status":"unaffected"}],"vendor":"Red Hat","product":"Red Hat OpenShift AI 3.4","package":"rhoai/odh-workbench-jupyter-minimal-rocm-py312-rhel9","cpe":"cpe:/a:redhat:openshift_ai:3.4::el9","source":"cvelist"},{"ranges":[{"type":"rpm","introduced":"1787073605","fixed":"*","status":"unaffected"}],"vendor":"Red Hat","product":"Red Hat OpenShift AI 3.4","package":"rhoai/odh-workbench-jupyter-pytorch-cuda-py312-rhel9","cpe":"cpe:/a:redhat:openshift_ai:3.4::el9","source":"cvelist"},{"ranges":[{"type":"rpm","introduced":"1787073546","fixed":"*","status":"unaffected"}],"vendor":"Red Hat","product":"Red Hat OpenShift AI 3.4","package":"rhoai/odh-workbench-jupyter-pytorch-rocm-py312-rhel9","cpe":"cpe:/a:redhat:openshift_ai:3.4::el9","source":"cvelist"},{"ranges":[{"type":"rpm","introduced":"1787073717","fixed":"*","status":"unaffected"}],"vendor":"Red Hat","product":"Red Hat OpenShift AI 3.4","package":"rhoai/odh-workbench-jupyter-tensorflow-cuda-py312-rhel9","cpe":"cpe:/a:redhat:openshift_ai:3.4::el9","source":"cvelist"},{"ranges":[{"type":"rpm","introduced":"1787073713","fixed":"*","status":"unaffected"}],"vendor":"Red Hat","product":"Red Hat OpenShift AI 3.4","package":"rhoai/odh-workbench-jupyter-tensorflow-rocm-py312-rhel9","cpe":"cpe:/a:redhat:openshift_ai:3.4::el9","source":"cvelist"},{"ranges":[{"type":"rpm","introduced":"1787073593","fixed":"*","status":"unaffected"}],"vendor":"Red Hat","product":"Red Hat OpenShift AI 3.4","package":"rhoai/odh-workbench-jupyter-trustyai-cpu-py312-rhel9","cpe":"cpe:/a:redhat:openshift_ai:3.4::el9","source":"cvelist"},{"ranges":[],"vendor":"Red Hat","product":"Red Hat OpenShift AI (RHOAI)","package":"rhoai/odh-th06-cpu-torch291-py312-rhel9","cpe":"cpe:/a:redhat:openshift_ai","source":"cvelist"},{"ranges":[],"vendor":"Red Hat","product":"Red Hat OpenShift AI (RHOAI)","package":"rhoai/odh-th06-cuda130-torch291-py312-rhel9","cpe":"cpe:/a:redhat:openshift_ai","source":"cvelist"},{"ranges":[],"vendor":"Red Hat","product":"Red Hat OpenShift AI (RHOAI)","package":"rhoai/odh-workbench-jupyter-pytorch-llmcompressor-cuda-py312-rhel9","cpe":"cpe:/a:redhat:openshift_ai","source":"cvelist"},{"ranges":[{"type":"ecosystem","introduced":"0","status":"affected","fixed":"4.5.7"}],"ecosystem":"PyPI","package":"jupyterlab","purl":"pkg:pypi/jupyterlab","source":"ghsa"},{"ranges":[{"type":"ecosystem","introduced":"7.0.0","status":"affected","fixed":"7.5.6"}],"ecosystem":"PyPI","package":"notebook","purl":"pkg:pypi/notebook","source":"ghsa"},{"ranges":[{"status":"affected","fixed":"4.5.7"}],"vendor":"jupyter","product":"jupyterlab","cpe":"cpe:2.3:a:jupyter:jupyterlab:*:*:*:*:*:*:*:*","source":"nvd"},{"ranges":[{"status":"affected","introduced":"7.0.0","fixed":"7.5.6"}],"vendor":"jupyter","product":"notebook","cpe":"cpe:2.3:a:jupyter:notebook:*:*:*:*:*:*:*:*","source":"nvd"},{"ranges":[{"type":"ecosystem","introduced":"0","status":"affected","fixed":"4.5.7"}],"ecosystem":"PyPI","package":"jupyterlab","purl":"pkg:pypi/jupyterlab","source":"pysec"},{"ranges":[{"type":"ecosystem","introduced":"7.0.0","status":"affected","fixed":"7.5.6"}],"ecosystem":"PyPI","package":"notebook","purl":"pkg:pypi/notebook","source":"pysec"},{"ranges":[{"type":"semver","introduced":"7.0.0","status":"affected","fixed":"7.5.6"}],"ecosystem":"Bitnami","package":"jupyter-base-notebook","purl":"pkg:bitnami/jupyter-base-notebook","source":"bitnami"},{"ranges":[{"type":"semver","introduced":"7.0.0","status":"affected","fixed":"7.5.6"}],"ecosystem":"Bitnami","package":"jupyter-notebook","purl":"pkg:bitnami/jupyter-notebook","source":"bitnami"},{"ranges":[{"type":"semver","introduced":"0","status":"affected","fixed":"4.5.7"}],"ecosystem":"Bitnami","package":"jupyterlab","purl":"pkg:bitnami/jupyterlab","source":"bitnami"}],"references":[{"url":"https://github.com/jupyterlab/jupyterlab/security/advisories/GHSA-mqcg-5x36-vfcg","tags":["advisory","mitigation","vendor-advisory","web","x-refsource-confirm"],"sources":["cvelist","ghsa","nvd","pysec","bitnami"]},{"url":"https://access.redhat.com/security/cve/CVE-2026-42557","tags":["vdb-entry","web","x-refsource-redhat"],"sources":["cvelist","nvd","bitnami"]},{"url":"https://bugzilla.redhat.com/show_bug.cgi?id=2477086","tags":["issue-tracking","web","x-refsource-redhat"],"sources":["cvelist","nvd","bitnami"]},{"url":"https://security.access.redhat.com/data/csaf/v2/vex/2026/cve-2026-42557.json","tags":["web","x-sadp-csaf-vex"],"sources":["cvelist","nvd","bitnami"]},{"url":"https://access.redhat.com/errata/RHSA-2026:43038","tags":["vendor-advisory","web","x-refsource-redhat"],"sources":["cvelist","nvd","bitnami"]},{"url":"https://access.redhat.com/errata/RHSA-2026:60520","tags":["vendor-advisory","web","x-refsource-redhat"],"sources":["cvelist","nvd","bitnami"]},{"url":"https://nvd.nist.gov/vuln/detail/CVE-2026-42557","tags":["advisory","web"],"sources":["ghsa","pysec","bitnami"]},{"url":"https://github.com/jupyterlab/jupyterlab","tags":["package"],"sources":["ghsa","pysec"]},{"url":"https://jupyterlab.readthedocs.io/en/latest/user/commands.html#commands-in-markdown-files","tags":["web"],"sources":["ghsa","pysec"]},{"url":"https://pypi.org/project/jupyterlab","tags":["package"],"sources":["pysec"]},{"url":"https://github.com/advisories/GHSA-mqcg-5x36-vfcg","tags":["advisory"],"sources":["pysec"]},{"url":"https://pypi.org/project/notebook","tags":["package"],"sources":["pysec"]}],"credits":[],"assigner":"GitHub_M","ssvc":{"scorer":"CISA-ADP","exploitation":"none","automatable":"no","technicalImpact":"total","date":"2026-05-14T17:57:35.710Z"},"sources":[{"source":"cvelist","name":"CVE List","id":"CVE-2026-42557","url":"https://www.cve.org/CVERecord?id=CVE-2026-42557","licence":"CVE Terms of Use","modified":"2026-08-28T12:04:30.875Z"},{"source":"ghsa","name":"GitHub Advisory Database","id":"GHSA-mqcg-5x36-vfcg","url":"https://github.com/advisories/GHSA-mqcg-5x36-vfcg","licence":"CC-BY-4.0","modified":"2026-09-10T03:51:06.550Z"},{"source":"nvd","name":"NVD","id":"CVE-2026-42557","url":"https://nvd.nist.gov/vuln/detail/CVE-2026-42557","licence":"Public domain","modified":"2026-10-25T23:10:00.167Z"},{"source":"pysec","name":"PyPA Advisory Database","id":"PYSEC-2026-2537","url":"https://osv.dev/vulnerability/PYSEC-2026-2537","licence":"CC-BY-4.0","modified":"2026-07-13T16:43:04.081Z"},{"source":"pysec","name":"PyPA Advisory Database","id":"PYSEC-2026-2681","url":"https://osv.dev/vulnerability/PYSEC-2026-2681","licence":"CC-BY-4.0","modified":"2026-07-13T16:43:04.081Z"},{"source":"bitnami","name":"Bitnami Vulnerability Database","id":"BIT-JUPYTER-BASE-NOTEBOOK-2026-42557","url":"https://osv.dev/vulnerability/BIT-JUPYTER-BASE-NOTEBOOK-2026-42557","licence":"Apache-2.0","modified":"2026-09-10T16:01:22.924Z"},{"source":"bitnami","name":"Bitnami Vulnerability Database","id":"BIT-JUPYTER-NOTEBOOK-2026-42557","url":"https://osv.dev/vulnerability/BIT-JUPYTER-NOTEBOOK-2026-42557","licence":"Apache-2.0","modified":"2026-09-10T16:00:10.631Z"},{"source":"bitnami","name":"Bitnami Vulnerability Database","id":"BIT-JUPYTERLAB-2026-42557","url":"https://osv.dev/vulnerability/BIT-JUPYTERLAB-2026-42557","licence":"Apache-2.0","modified":"2026-09-10T16:01:40.975Z"}],"updatedAt":"2026-11-25T22:59:21.574Z","epss":{"score":0.00486,"percentile":0.43513,"date":"2026-12-01T12:00:22.000Z"}}