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
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.
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.
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:
| Package | Registry | Affected | Fixed in |
|---|---|---|---|
| jupyterlab | PyPI | >= 4.5.0, <= 4.5.10 | 4.5.11 |
| jupyterlab | PyPI | >= 4.6.0, <= 4.6.3 | 4.6.4 |
| notebook | PyPI | >= 7.5.0, <= 7.6.2 | 7.6.3 |
- CriticalMarimo: Pre-Auth Remote Code Execution via Terminal WebSocket Authentication BypassmarimoExploited
- CriticalLangflow CORS misconfiguration enables Account Takeover and RCElangflowExploited
- HighLiteLLM: MCP Authentication Bypass via OAuth2 Passthrough FallbacklitellmExploited
- HighLangflow: IDOR Vulnerability in `/api/v1/responses` Endpoint Allows Authenticated Attackers to Access Another User's FlowlangflowExploited
- CriticalTodoist MCP Server: Browser DNS rebinding lets websites write and delete Todoist data through local MCP server@doist/todoist-mcp
- CriticalLangflow: Unauthenticated Flow Execution via Webhook Authentication Bypasslangflow
- CriticalImproper Input Validation in Jupyter Notebookipython, notebook
- HighJupyterLab: Image viewer allows XSS when opening malicious image in new browser tabjupyterlab, jupyterlab
- HighJupyterLab: Cross-site scripting (XSS) via crafted settings file (`overrides.json`)jupyterlab, jupyterlab
- HighJupyterLab's command linker attributes in HTML enable one-click command execution from untrusted contentjupyterlab, notebook
- HighJupyterLab has an Extension Manager API/GUI Policy Discrepancy, allowing 3rd party (malicious) extensions install via POST requestjupyterlab
- HighJupyter Notebook Vulnerable to Authentication Token Theft via CommandLinker XSSjupyterlab, notebook
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.