CVE-2026-42557 jupyterlab: Command linker attributes in HTML enable one-click command execution from untrusted content
Attackers can execute arbitrary JupyterLab commands via malicious HTML buttons in notebook outputs, leading to code execution upon user click.
- Exploited in the wild
- Not known
- Login needed
- Not needed
- Attackable
- Over the internet
- Victim action needed
- A user has to click or open something
- Fix
- Available
What is CVE-2026-42557?
CVE-2026-42557 is a high-severity cross-site scripting vulnerability in jupyterlab, published on 13 May 2026. An attacker can exploit it over the internet without logging in, and only if a user opens a file or follows a link.
Official 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.
Weakness: CWE-79
Which versions are affected by CVE-2026-42557?
9 open source packages ship an affected version, including jupyterlab, jupyter-base-notebook and jupyter-notebook. It affects 2 products.
| Package | Affected | Fixed in |
|---|---|---|
jupyterlab Bitnami | All versions | 4.5.7 |
jupyterlab PyPI | All versions | 4.5.7 |
jupyterlab PyPI | All versions | 4.5.7 |
jupyterlab PyPI | All versions | 4.5.7 |
jupyter-base-notebook Bitnami | From 7.0.0 | 7.5.6 |
jupyter-notebook Bitnami | From 7.0.0 | 7.5.6 |
3 more packages
notebook PyPI | From 7.0.0 | 7.5.6 |
notebook PyPI | From 7.0.0 | 7.5.6 |
notebook PyPI | From 7.0.0 | 7.5.6 |
Products include Jupyter Jupyterlab, Jupyter Notebook.
How do I fix CVE-2026-42557?
Upgrade jupyterlab to 4.5.7 or later.
Escape output for the context it lands in and set a strict Content Security Policy. Upgrading the affected component is the real fix. More about Cross-site scripting.
Is CVE-2026-42557 being exploited?
There is no known exploitation of CVE-2026-42557 in the wild and no public exploit code.
Other vulnerabilities in jupyterlab
- CVE-2024-39700 Remote Code Execution (RCE) vulnerability in jupyterlab extension template `update-integration-tests` GitHub Action
- CVE-2026-42266 JupyterLab has an Extension Manager API/GUI Policy Discrepancy, allowing 3rd party (malicious) extensions install via POST request
- CVE-2024-43805 HTML injection in Jupyter Notebook and JupyterLab leading to DOM Clobbering
- CVE-2021-32797 JupyterLab: XSS due to lack of sanitization of the action attribute of an html <form>
- CVE-2025-59842 JupyterLab LaTeX typesetter links did not enforce `noopener` attribute
Sources
Also known as BIT-jupyter-base-notebook-2026-42557, BIT-jupyter-notebook-2026-42557, BIT-jupyterlab-2026-42557, CLEANSTART-2026-AQ42255, CLEANSTART-2026-CB04703, DEBIAN-CVE-2026-42557 and 4 more.