# 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.

- **Severity:** High 8.6 (`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`)
- **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:** Yes
- **Published:** 13 May 2026
- **Updated:** 28 Aug 2026
- **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, GHSA-mqcg-5x36-vfcg, PYSEC-2026-2537, PYSEC-2026-2681, UBUNTU-CVE-2026-42557

## 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 (Improper Neutralization of Input During Web Page Generation)

## 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 | Ecosystem | 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 |
| `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: Jupyter Jupyterlab, Jupyter Notebook.

## How do I fix CVE-2026-42557?

Upgrade jupyterlab to 4.5.7 or later.

## 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](https://insights.sbomify.com/CVE-2024-39700/): Remote Code Execution (RCE) vulnerability in jupyterlab extension template `update-integration-tests` GitHub Action (critical 10.0)
- [CVE-2026-42266](https://insights.sbomify.com/CVE-2026-42266/): JupyterLab has an Extension Manager API/GUI Policy Discrepancy, allowing 3rd party (malicious) extensions install via POST request (high 8.8)
- [CVE-2024-43805](https://insights.sbomify.com/CVE-2024-43805/): HTML injection in Jupyter Notebook and JupyterLab leading to DOM Clobbering (high 7.6)
- [CVE-2021-32797](https://insights.sbomify.com/CVE-2021-32797/): JupyterLab: XSS due to lack of sanitization of the action attribute of an html <form> (high 7.4)
- [CVE-2025-59842](https://insights.sbomify.com/CVE-2025-59842/): JupyterLab LaTeX typesetter links did not enforce `noopener` attribute (low 2.1)

## Fix prompt for AI coding agents

```text
Check this codebase for CVE-2026-42557 and fix it if it is affected.

What it is: 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.
Exploitation: There is no known exploitation of CVE-2026-42557 in the wild and no public exploit code.

Affected packages and fixed versions:
- jupyterlab (Bitnami): affected all versions; fixed in 4.5.7
- jupyterlab (PyPI): affected all versions; fixed in 4.5.7
- jupyterlab (PyPI): affected all versions; fixed in 4.5.7
- jupyterlab (PyPI): affected all versions; fixed in 4.5.7
- jupyter-base-notebook (Bitnami): affected from 7.0.0; fixed in 7.5.6
- jupyter-notebook (Bitnami): affected from 7.0.0; fixed in 7.5.6
- notebook (PyPI): affected from 7.0.0; fixed in 7.5.6
- notebook (PyPI): affected from 7.0.0; fixed in 7.5.6
- notebook (PyPI): affected from 7.0.0; fixed in 7.5.6

Task:
1. Search the dependency manifests and lockfiles (for example package.json, package-lock.json, requirements.txt, poetry.lock, uv.lock, pom.xml, build.gradle, go.mod, Cargo.lock, Gemfile.lock) and any Dockerfiles for the affected packages, including transitive dependencies.
2. If an affected version is in use, upgrade it to the fixed version for its release line with the project's package manager, so the lockfile is regenerated. Prefer the smallest upgrade that fixes it.
3. If there is no fix, or the upgrade would break the build, do not guess: explain the risk and the safest workaround instead.
4. Run the tests and summarise what changed and why.
5. If nothing in the project is affected, say so and change nothing.

Reference: https://insights.sbomify.com/CVE-2026-42557/ (Markdown: https://insights.sbomify.com/CVE-2026-42557/index.md)
```

## Sources

- CVE record: https://www.cve.org/CVERecord?id=CVE-2026-42557
- NVD: https://nvd.nist.gov/vuln/detail/CVE-2026-42557
- OSV: https://osv.dev/vulnerability/CVE-2026-42557

---
From sbomify Insights: https://insights.sbomify.com/CVE-2026-42557/
Summaries are generated and may contain mistakes; the official description above is the record.
