UTC
High

JupyterLab: Cross-site scripting (XSS) in JupyterLab via notebook cells pasted from the system clipboard

CVE-2026-102831 · GHSA-6966-vjj6-99xv · published 2026-10-01

Severity
High
CVSS score
8.1
Chance of exploitation (EPSS)
0.24%
Fixed in
4.6.4
  • Exploitation No known exploitation
  • Automatable No
  • Technical impact Total
  • CISA SSVC
What it is

The script runs in the JupyterLab page, in the same origin and session as the authenticated user, so it can call the Jupyter Server REST API as that user: read and write any file under the server root, start a kernel and run code in it, and open a terminal where terminals are enabled. It runs on paste, without the user executing anything. Only the output of a code cell can run a script this way. Markdown and raw cells are always sanitized, as the trust documentation states. The attacker needs no JupyterLab account and no access to the server, only the user's clipboard at the moment of the paste.

What to do

Upgrade jupyterlab to 4.6.4 or later, and notebook to 7.6.3 or later.

JupyterLab v4.6.4 and v4.5.11 contain the patch. Cells read from the system clipboard that cannot be traced to the current window no longer carry metadata.trusted into the notebook, so their outputs are sanitized like any other content of unknown origin. Users of applications that depend on JupyterLab, such as Notebook v7+, should update jupyterlab package too.

If you cannot upgrade yet

On 4.5.2 and later, confirm that the system clipboard is not in use for cells. The setting is off by default; check Settings, Notebook, or the raw value: With that setting off, cell copy and paste use JupyterLab's in-application clipboard, which never leaves the page. The cost is that cells can no longer be copied between browser tabs or windows. On 4.5.0 and 4.5.1 there is no such setting, and every paste reads the system clipboard and upgrade is highly recommended. Pasting cells without their outputs also stops the script from running, at the cost of discarding outputs on every paste:

Affected
PackageRegistryAffectedFixed in
jupyterlabPyPI>= 4.5.0, <= 4.5.104.5.11
jupyterlabPyPI>= 4.6.0, <= 4.6.34.6.4
notebookPyPI>= 7.5.0, <= 7.6.27.6.3

The impact, patch and workaround text comes from the advisory, shortened (GitHub Advisory Database, CC BY 4.0). Proof-of-concept and reproduction sections and code are left out; the original advisory has them.

Sources: GitHub Advisory Database, reviewed and malware advisories (CC BY 4.0, https://github.com/advisories); advisories published by Cursor (https://github.com/cursor/cursor/security/advisories); advisories published by OpenClaw (https://github.com/openclaw/openclaw/security/advisories); advisories published by vLLM (https://github.com/vllm-project/vllm/security/advisories); advisories published by Open WebUI (https://github.com/open-webui/open-webui/security/advisories); advisories published by n8n (https://github.com/n8n-io/n8n/security/advisories); advisories published by Flowise (https://github.com/FlowiseAI/Flowise/security/advisories); advisories published by Langflow (https://github.com/langflow-ai/langflow/security/advisories); advisories published by the MCP Python SDK project (https://github.com/modelcontextprotocol/python-sdk/security/advisories); advisories published by MLflow (https://github.com/mlflow/mlflow/security/advisories); CISA Known Exploited Vulnerabilities catalog (CC0). Data as of 2026-11-22. ShieldMap describes how each problem works and how to fix it; it does not publish exploit code. Report a correction to [email protected].