JupyterLab: Cross-site scripting (XSS) in JupyterLab via notebook cells pasted from the system clipboard
## Description JupyterLab 4.5.0 enabled copying and pasing cells through the system clipboard. The paste path parses clipboard text as cell JSON and inserts the cells without clearing `metadata.trusted`, so a payload can declare its own output as trusted. JupyterLab does not sanitize a trusted output and evaluates the `" } } ] } ] ``` Users are affected if all of the following are true: - they run JupyterLab 4.5.0 through 4.6.3, or an application that bundles it such as Notebook 7.5+; - if running 4.5.2 or newer, `useSystemClipboardForCells` is enabled - it is off by default in 4.5.2+, and always enabled on 4.5.0 and 4.5.1 with no opt-out - they run a Paste Cells command (e.g. from context menu, command palette, shortcut) while attacker-controlled text is in the clipboard; and - `pasteCodeCellsWithoutOutput` is off, the default, so the pasted cell keeps its outputs ### Impact 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](https://jupyterlab.readthedocs.io/en/latest/user/notebook.html#trust) states. The attacker needs no JupyterLab account and no access to th
PYSEC-2026-4060
Primary source · Revision 1
Imported from structured advisory data. Source references identify upstream records or fields; verify affected versions and your deployed configuration.
Security context
Source reference: osv:PYSEC-2026-4060
jupyterlite-core
Source reference: /affected/0/package/name
- Affected versions
- 0.7.0
Source reference:
/affected/0/versions0.7.1Source reference:
/affected/0/versions0.7.2Source reference:
/affected/0/versions0.7.3Source reference:
/affected/0/versions0.7.4Source reference:
/affected/0/versions0.7.5Source reference:
/affected/0/versions0.7.6Source reference:
/affected/0/versions0.8.0Source reference:
/affected/0/versions0.8.0a0Source reference:
/affected/0/versions0.8.0a1Source reference:
/affected/0/versions0.8.0a2Source reference:
/affected/0/versions0.8.0b0Source reference:
/affected/0/versions0.8.0b1Source reference:
/affected/0/versions0.8.0rc0Source reference:
/affected/0/versions0.8.1Source reference:
/affected/0/versions0.8.2Source reference:
/affected/0/versions0.8.3Source reference:
/affected/0/versions - Fixed versions
- 0.8.4
Source reference:
/affected/0/ranges - Prerequisites
- Not stated in this record
Structured affected-version data
Original package identities and version rules from this source.
[
{
"ranges": [
{
"type": "ECOSYSTEM",
"events": [
{
"introduced": "0.7.0"
},
{
"fixed": "0.8.4"
}
]
}
],
"package": {
"name": "jupyterlite-core",
"purl": "pkg:pypi/jupyterlite-core",
"ecosystem": "PyPI"
},
"versions": [
"0.7.0",
"0.7.1",
"0.7.2",
"0.7.3",
"0.7.4",
"0.7.5",
"0.7.6",
"0.8.0",
"0.8.0a0",
"0.8.0a1",
"0.8.0a2",
"0.8.0b0",
"0.8.0b1",
"0.8.0rc0",
"0.8.1",
"0.8.2",
"0.8.3"
],
"database_specific": {
"source": "https://github.com/pypa/advisory-database/blob/main/vulns/jupyterlite-core/PYSEC-2026-4060.yaml"
}
}
]- Related CVEs
- CVE-2026-102831
Source reference:
/aliases
Publisher severity
No explicit severity was provided.
- Event
- #62593 · Revision 1
- Added to Heist Feed
- Publisher date