CVE-2026-102831: JupyterLab Cross-Site Scripting Vulnerability

HIGH
Advisory Identifier: GHSA-6966-vjj6-99xv
CVSS 8.1
CWE-345 CWE-79
Published
Advisory Summary

CVE-2026-102831 is a HIGH (CVSS 8.1) cross-site scripting vulnerability (CWE-345: Insufficient Verification of Data Authenticity) affecting JupyterLab libraries in the PyPI ecosystem. The issue involves cross-site scripting (xss) in jupyterlab via notebook cells pasted from the system clipboard. Remediation is available by upgrading affected packages to version 4.6.4, 4.5.11, 7.6.3, 0.8.4.

CVE-2026-102831 at a Glance

CVE Identifier CVE-2026-102831
GHSA Identifier GHSA-6966-vjj6-99xv
Severity HIGH
CVSS v3.1 Base Score 8.1
CWE Classification CWE-345: Insufficient Verification of Data Authenticity
Affected Product JupyterLab
Package Ecosystem PyPI
Published Date
Last Updated

Security Impact

CVSS: 8.1

The security impact metrics below are parsed directly from the CVSS v3.1 vector string (CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:N).

Attack Vector Network (AV:N)
Attack Complexity Low (AC:L)
Privileges Required None (PR:N)
User Interaction Required (UI:R)
Scope Unchanged (S:U)
Confidentiality High (C:H)
Integrity High (I:H)
Availability None (A:N)

How to Fix CVE-2026-102831

To remediate this vulnerability, upgrade all affected JupyterLab dependencies to a patched release. Both direct and transitive dependencies should be checked, as frameworks or security libraries may pull in vulnerable versions transitively.

jupyterlab fixed: 4.6.4
pip install jupyterlab>=4.6.4
jupyterlab fixed: 4.5.11
pip install jupyterlab>=4.5.11
notebook fixed: 7.6.3
pip install notebook>=7.6.3
jupyterlite fixed: 0.8.4
pip install jupyterlite>=0.8.4
jupyterlite-core fixed: 0.8.4
pip install jupyterlite-core>=0.8.4
Verify Direct and Transitive Dependencies

Run the following command in your project directory to verify that all resolved dependencies use the patched release:

pip show jupyterlab

How to Check if You Are Affected

To determine whether your Python environment is affected by CVE-2026-102831, inspect your installed packages using pip:

pip show jupyterlab

Analyze the terminal output to locate any version of JupyterLab in your dependency tree. If any resolved version matches the vulnerable ranges listed in the table below (for example, versions earlier than 4.6.4), your application is affected.

Note: The pip show jupyterlab command checks currently installed packages in your active Python environment.

Technical Details

Vulnerability Mechanism & Technical Analysis

This vulnerability is classified under CWE-345: Insufficient Verification of Data Authenticity, where the product does not sufficiently verify the origin or authenticity of data, in a way that causes it to accept invalid data. In JupyterLab, software state validation or input boundaries are circumvented during processing. Review the official source advisory statement below for specific affected components, classes, and reproduction details.

Source Advisory Statement

## 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 `<script>` elements it contains, so pasting the cell runs attacker's JavaScript in the JupyterLab origin. The same payload with `"trusted": false` is sanitized. ```json [ { "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 ### 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 the server, only the user's clipboard at the moment of the paste. A web page can replace the text you copy from it, or write the clipboard directly once you have given it permission. Both need you to click or press a key on that page first. ### Patches JupyterLab [`v4.6.4`](https://github.com/jupyterlab/jupyterlab/releases/tag/v4.6.4) and [`v4.5.11`](https://github.com/jupyterlab/jupyterlab/releases/tag/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. ### Workarounds 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: ```json { "@jupyterlab/notebook-extension:tracker": { "useSystemClipboardForCells": false } } ``` 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: ```json { "@jupyterlab/notebook-extension:tracker": { "pasteCodeCellsWithoutOutput": true } } ```

CVE-2026-102831 Affected JupyterLab Versions

5 component(s)
Fixed Versions:
4.6.44.5.117.6.30.8.4
Product / Package Ecosystem Affected Versions Fixed Version
jupyterlab
PyPI
≥ 4.6.0
< 4.6.4
4.6.4
jupyterlab
PyPI
≥ 4.5.0
< 4.5.11
4.5.11
notebook
PyPI
≥ 7.5.0
< 7.6.3
7.6.3
jupyterlite
PyPI
≥ 0.7.0
< 0.8.4
0.8.4
jupyterlite-core
PyPI
≥ 0.7.0
< 0.8.4
0.8.4

References

Frequently Asked Questions

What is CVE-2026-102831?
CVE-2026-102831 is a security vulnerability in JupyterLab involving Cross-site scripting (XSS) in JupyterLab via notebook cells pasted from the system clipboard under CWE-345: Insufficient Verification of Data Authenticity.
Which JupyterLab versions are affected?
Affected versions include releases prior to 4.6.4, 4.5.11, 7.6.3, 0.8.4 across affected packages: jupyterlab, notebook, jupyterlite, jupyterlite-core.
What version fixes CVE-2026-102831?
Upgrading to 4.6.4, 4.5.11, 7.6.3, 0.8.4 (or the latest patched release for your respective branch) resolves the vulnerability.
Is jupyterlab affected?
Yes, jupyterlab is affected in releases prior to 4.6.4, 4.5.11. Upgrade your dependency to 4.6.4, 4.5.11 or later.
Is notebook affected?
Yes, notebook is affected in releases prior to 7.6.3. Upgrade your dependency to 7.6.3 or later.
What is the CVSS score of CVE-2026-102831?
CVE-2026-102831 has a CVSS v3.1 base score of 8.1 (HIGH) with vector string CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:N.
What CWE is associated with CVE-2026-102831?
CVE-2026-102831 is classified under CWE-345: Insufficient Verification of Data Authenticity (The product does not sufficiently verify the origin or authenticity of data, in a way that causes it to accept invalid data.).
How can I check PyPI dependencies for CVE-2026-102831?
Run the dependency tree command: 'pip show jupyterlab'. This command lists direct and transitive dependencies in your build configuration so you can verify if a vulnerable version is resolved.
Machine-readable OSV JSON OSV v1.5 Schema
Normalized schema output
{
  "schema_version" : "1.4.0",
  "id" : "GHSA-6966-vjj6-99xv",
  "modified" : "2026-10-01T15:20:41Z",
  "published" : "2026-10-01T15:20:41Z",
  "aliases" : [ "CVE-2026-102831" ],
  "summary" : "JupyterLab: Cross-site scripting (XSS) in JupyterLab via notebook cells pasted from the system clipboard",
  "details" : "## Description\n\nJupyterLab 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.\n\n```json\n[\n  {\n    \"cell_type\": \"code\",\n    \"execution_count\": null,\n    \"source\": \"\",\n    \"metadata\": { \"trusted\": true },\n    \"outputs\": [\n      {\n        \"output_type\": \"display_data\",\n        \"metadata\": {},\n        \"data\": { \"text/html\": \"<script>/* runs on paste */</script>\" }\n      }\n    ]\n  }\n]\n```\n\nUsers are affected if all of the following are true:\n\n- they run JupyterLab 4.5.0 through 4.6.3, or an application that bundles it such as Notebook 7.5+;\n- 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\n- they run a Paste Cells command (e.g. from context menu, command palette, shortcut) while attacker-controlled text is in the clipboard; and\n- `pasteCodeCellsWithoutOutput` is off, the default, so the pasted cell keeps its outputs\n\n\n### Impact\n\nThe 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.\n\nOnly 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.\n\nThe attacker needs no JupyterLab account and no access to the server, only the user's clipboard at the moment of the paste. A web page can replace the text you copy from it, or write the clipboard directly once you have given it permission. Both need you to click or press a key on that page first.\n\n### Patches\n\nJupyterLab [`v4.6.4`](https://github.com/jupyterlab/jupyterlab/releases/tag/v4.6.4) and [`v4.5.11`](https://github.com/jupyterlab/jupyterlab/releases/tag/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.\n\nUsers of applications that depend on JupyterLab, such as Notebook v7+, should update `jupyterlab` package too.\n\n### Workarounds\n\nOn 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:\n\n```json\n{\n  \"@jupyterlab/notebook-extension:tracker\": {\n    \"useSystemClipboardForCells\": false\n  }\n}\n```\n\nWith 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.\n\nOn 4.5.0 and 4.5.1 there is no such setting, and every paste reads the system clipboard and upgrade is highly recommended.\n\nPasting cells without their outputs also stops the script from running, at the cost of discarding outputs on every paste:\n\n```json\n{\n  \"@jupyterlab/notebook-extension:tracker\": {\n    \"pasteCodeCellsWithoutOutput\": true\n  }\n}\n```",
  "severity" : [ {
    "type" : "CVSS_V3",
    "score" : "CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:N"
  } ],
  "affected" : [ {
    "package" : {
      "ecosystem" : "PyPI",
      "name" : "jupyterlab"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "4.6.0"
      }, {
        "fixed" : "4.6.4"
      } ]
    } ],
    "database_specific" : {
      "last_known_affected_version_range" : "<= 4.6.3"
    }
  }, {
    "package" : {
      "ecosystem" : "PyPI",
      "name" : "jupyterlab"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "4.5.0"
      }, {
        "fixed" : "4.5.11"
      } ]
    } ],
    "database_specific" : {
      "last_known_affected_version_range" : "<= 4.5.10"
    }
  }, {
    "package" : {
      "ecosystem" : "PyPI",
      "name" : "notebook"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "7.5.0"
      }, {
        "fixed" : "7.6.3"
      } ]
    } ],
    "database_specific" : {
      "last_known_affected_version_range" : "<= 7.6.2"
    }
  }, {
    "package" : {
      "ecosystem" : "PyPI",
      "name" : "jupyterlite"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "0.7.0"
      }, {
        "fixed" : "0.8.4"
      } ]
    } ],
    "database_specific" : {
      "last_known_affected_version_range" : "<= 0.8.3"
    }
  }, {
    "package" : {
      "ecosystem" : "PyPI",
      "name" : "jupyterlite-core"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "0.7.0"
      }, {
        "fixed" : "0.8.4"
      } ]
    } ],
    "database_specific" : {
      "last_known_affected_version_range" : "<= 0.8.3"
    }
  } ],
  "references" : [ {
    "type" : "WEB",
    "url" : "https://github.com/jupyterlab/jupyterlab/security/advisories/GHSA-6966-vjj6-99xv"
  }, {
    "type" : "ADVISORY",
    "url" : "https://nvd.nist.gov/vuln/detail/CVE-2026-102831"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/jupyterlab/jupyterlab/commit/1a10a7da5ff655849b21581c2633b46483ae0be9"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/jupyterlab/jupyterlab/commit/7f9f29e29e0c83fb17b0f11da57d06b3c6a40d96"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/jupyterlab/jupyterlab/commit/cf6e89a8d315c4134cefa50c220bca296da466a7"
  }, {
    "type" : "PACKAGE",
    "url" : "https://github.com/jupyterlab/jupyterlab"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/jupyterlab/jupyterlab/releases/tag/v4.5.11"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/jupyterlab/jupyterlab/releases/tag/v4.6.4"
  } ],
  "database_specific" : {
    "cwe_ids" : [ "CWE-345", "CWE-79" ],
    "severity" : "HIGH",
    "github_reviewed" : true,
    "github_reviewed_at" : "2026-10-01T15:20:41Z",
    "nvd_published_at" : "2026-09-29T19:17:25Z"
  }
}