CVE-2026-42557: Jupyterlab JupyterLab's Command Linker Attributes Vulnerability
HIGHCVE-2026-42557 is a HIGH (CVSS 9.6) jupyterlab's command linker attributes vulnerability (CWE-79: Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting')) affecting Jupyterlab libraries in the PyPI ecosystem. The issue involves jupyterlab's command linker attributes in html enable one-click command execution from untrusted content. Remediation is available by upgrading affected packages to version 4.5.7, 7.5.6.
CVE-2026-42557 at a Glance
Security Impact
CVSS: 9.6
The security impact metrics below are parsed directly from the CVSS v3.1 vector string (CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:H/I:H/A:H).
How to Fix CVE-2026-42557
To remediate this vulnerability, upgrade all affected Jupyterlab dependencies to a patched release. Both direct and transitive dependencies should be checked, as frameworks or security libraries may pull in vulnerable versions transitively.
pip install jupyterlab>=4.5.7
pip install notebook>=7.5.6
Run the following command in your project directory to verify that all resolved dependencies use the patched release:
pip show jupyterlab
How to Check if You Are Affected
To determine whether your Python environment is affected by CVE-2026-42557, inspect your installed packages using pip:
pip show jupyterlab
Analyze the terminal output to locate any version of Jupyterlab in your dependency tree. If any resolved version matches the vulnerable ranges listed in the table below (for example, versions earlier than 4.5.7), your application is affected.
Note: The pip show jupyterlab command checks currently installed packages in your active Python environment.
Technical Details
Vulnerability Mechanism & Technical Analysis
This vulnerability is classified under CWE-79: Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting'), where the product does not neutralize or incorrectly neutralizes user-controllable input before it is placed in output that is used as a web page that is served to other users. In Jupyterlab, software state validation or input boundaries are circumvented during processing. Review the official source advisory statement below for specific affected components, classes, and reproduction details.
Source Advisory Statement
CVE-2026-42557 Affected Jupyterlab Versions
2 component(s)| Product / Package | Ecosystem | Affected Versions | Fixed Version |
|---|---|---|---|
|
jupyterlab
|
PyPI |
< 4.5.7
|
4.5.7
|
|
notebook
|
PyPI |
≥ 7.0.0
< 7.5.6
|
7.5.6
|
References
Frequently Asked Questions
What is CVE-2026-42557?
Which Jupyterlab versions are affected?
What version fixes CVE-2026-42557?
Is jupyterlab affected?
Is notebook affected?
What is the CVSS score of CVE-2026-42557?
What CWE is associated with CVE-2026-42557?
How can I check PyPI dependencies for CVE-2026-42557?
Machine-readable OSV JSON
OSV v1.5 Schema
{
"schema_version" : "1.4.0",
"id" : "GHSA-mqcg-5x36-vfcg",
"modified" : "2026-06-09T10:59:57Z",
"published" : "2026-05-06T21:43:44Z",
"aliases" : [ "CVE-2026-42557" ],
"summary" : "JupyterLab's command linker attributes in HTML enable one-click command execution from untrusted content",
"details" : "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",
"severity" : [ {
"type" : "CVSS_V3",
"score" : "CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:H/I:H/A:H"
}, {
"type" : "CVSS_V4",
"score" : "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"
} ],
"affected" : [ {
"package" : {
"ecosystem" : "PyPI",
"name" : "jupyterlab"
},
"ranges" : [ {
"type" : "ECOSYSTEM",
"events" : [ {
"introduced" : "0"
}, {
"fixed" : "4.5.7"
} ]
} ],
"database_specific" : {
"last_known_affected_version_range" : "<= 4.5.6"
}
}, {
"package" : {
"ecosystem" : "PyPI",
"name" : "notebook"
},
"ranges" : [ {
"type" : "ECOSYSTEM",
"events" : [ {
"introduced" : "7.0.0"
}, {
"fixed" : "7.5.6"
} ]
} ],
"database_specific" : {
"last_known_affected_version_range" : "<= 7.5.5"
}
} ],
"references" : [ {
"type" : "WEB",
"url" : "https://github.com/jupyterlab/jupyterlab/security/advisories/GHSA-mqcg-5x36-vfcg"
}, {
"type" : "ADVISORY",
"url" : "https://nvd.nist.gov/vuln/detail/CVE-2026-42557"
}, {
"type" : "PACKAGE",
"url" : "https://github.com/jupyterlab/jupyterlab"
}, {
"type" : "WEB",
"url" : "https://jupyterlab.readthedocs.io/en/latest/user/commands.html#commands-in-markdown-files"
} ],
"database_specific" : {
"cwe_ids" : [ "CWE-79" ],
"severity" : "HIGH",
"github_reviewed" : true,
"github_reviewed_at" : "2026-05-06T21:43:44Z",
"nvd_published_at" : "2026-05-13T16:16:48Z"
}
}