Advisory Database
  • Advisories
  • Dependency Scanning
  1. pypi
  2. ›
  3. jupyterlab
  4. ›
  5. CVE-2026-102831

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

October 1, 2026

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 <script> elements it contains, so pasting the cell runs attacker’s JavaScript in the JupyterLab origin. The same payload with "trusted": false is sanitized.

[
{
"cell_type": "code",
"execution_count": null,
"source": "",
"metadata": { "trusted": true },
"outputs": [
{
"output_type": "display_data",
"metadata": {},
"data": { "text/html": "<script>/* runs on paste */</script>" }
}
]
}
]

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

References

  • github.com/advisories/GHSA-6966-vjj6-99xv
  • github.com/jupyterlab/jupyterlab/commit/1a10a7da5ff655849b21581c2633b46483ae0be9
  • github.com/jupyterlab/jupyterlab/commit/7f9f29e29e0c83fb17b0f11da57d06b3c6a40d96
  • github.com/jupyterlab/jupyterlab/commit/cf6e89a8d315c4134cefa50c220bca296da466a7
  • github.com/jupyterlab/jupyterlab/releases/tag/v4.5.11
  • github.com/jupyterlab/jupyterlab/releases/tag/v4.6.4
  • github.com/jupyterlab/jupyterlab/security/advisories/GHSA-6966-vjj6-99xv
  • nvd.nist.gov/vuln/detail/CVE-2026-102831

Code Behaviors & Features

Detect and mitigate CVE-2026-102831 with GitLab Dependency Scanning

Secure your software supply chain by verifying that all open source dependencies used in your projects contain no disclosed vulnerabilities. Learn more about Dependency Scanning →

Affected versions

All versions starting from 4.5.0 before 4.5.11, all versions starting from 4.6.0 before 4.6.4

Fixed versions

  • 4.5.11
  • 4.6.4

Solution

Upgrade to versions 4.5.11, 4.6.4 or above.

Impact 8.1 HIGH

CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:N

Learn more about CVSS

Weakness

  • CWE-345: Insufficient Verification of Data Authenticity
  • CWE-79: Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting')

Source file

pypi/jupyterlab/CVE-2026-102831.yml

Spotted a mistake? Edit the file on GitLab.

  • Site Repo
  • About GitLab
  • Terms
  • Privacy Statement
  • Contact

Page generated Mon, 12 Oct 2026 00:22:45 +0000.