Skip to content
Heist/ feed
HighFix available

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

Type: advisorySource: OSV1 source record

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

Announced Group revision 1
Original source ↗

PYSEC-2026-4058

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-4058

jupyterlite

Source reference: /affected/0/package/name

Affected versions
0.7.0

Source reference: /affected/0/versions

0.7.1

Source reference: /affected/0/versions

0.7.2

Source reference: /affected/0/versions

0.7.3

Source reference: /affected/0/versions

0.7.4

Source reference: /affected/0/versions

0.7.5

Source reference: /affected/0/versions

0.7.6

Source reference: /affected/0/versions

0.8.0

Source reference: /affected/0/versions

0.8.0a0

Source reference: /affected/0/versions

0.8.0a1

Source reference: /affected/0/versions

0.8.0a2

Source reference: /affected/0/versions

0.8.0b0

Source reference: /affected/0/versions

0.8.0b1

Source reference: /affected/0/versions

0.8.0rc0

Source reference: /affected/0/versions

0.8.1

Source reference: /affected/0/versions

0.8.2

Source reference: /affected/0/versions

0.8.3

Source 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",
      "purl": "pkg:pypi/jupyterlite",
      "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/PYSEC-2026-4058.yaml"
    }
  }
]
Related CVEs
CVE-2026-102831

Source reference: /aliases

Publisher severity

No explicit severity was provided.

Linked CVE context

These ratings describe the referenced vulnerabilities and products. They are not a severity rating for every application using this dependency.

CVE-2026-102831 · High

jupyterlab, notebook, jupyterlite-core

CVE-2026-102831 · High

jupyterlab, jupyterlab, notebook, jupyterlite, jupyterlite-core

Event
#62592 · Revision 1
Added to Heist Feed
Publisher date
Read the original announcement