CVE-2026-102831

CVE-2026-102831 is a high-severity cross-site scripting (XSS) vulnerability in jupyterlab (pip), affecting versions >= 4.6.0, <= 4.6.3. It is fixed in 4.6.4, 4.5.11, 7.6.3, 0.8.4.

Does this CVE actually affect you?

Kodem shows which CVEs are reachable and running in your applications, so you fix what's exploitable, not just what's listed.

Thank you! Your submission has been received!
Oops! Something went wrong while submitting the form.

Runtime intelligence, not another scanner.

Summary

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

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:

{
  "@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:

{
  "@jupyterlab/notebook-extension:tracker": {
    "pasteCodeCellsWithoutOutput": true
  }
}

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

Untrusted input is rendered as active markup in a victim's browser, which can run script in their session. Typical impact: session or credential theft, and actions taken as the user.

CVE-2026-102831 has a CVSS score of 8.1 (High). The vector is network-reachable, no privileges required, and user interaction required. A CVSS score reflects the worst-case severity of the vulnerability, not your specific exposure. Whether this affects your application depends on whether the vulnerable code is present and reachable in your environment. A fixed version is available (4.6.4, 4.5.11, 7.6.3, 0.8.4); upgrading removes the vulnerable code path.

Affected versions

jupyterlab (>= 4.6.0, <= 4.6.3) jupyterlab (>= 4.5.0, <= 4.5.10) notebook (>= 7.5.0, <= 7.6.2) jupyterlite (>= 0.7.0, <= 0.8.3) jupyterlite-core (>= 0.7.0, <= 0.8.3)

Security releases

jupyterlab → 4.6.4 (pip) jupyterlab → 4.5.11 (pip) notebook → 7.6.3 (pip) jupyterlite → 0.8.4 (pip) jupyterlite-core → 0.8.4 (pip)

Kodem intelligence

Severity tells you how bad this could be in the worst case. It does not tell you whether you are exposed. Exploitability and impact are functions of runtime truth: whether the vulnerable code is present, reachable, and actually executes in your application. A vulnerable package can sit in your dependency tree and never run.

Kodem, an Intelligent Application Security platform, uses runtime intelligence to reveal which vulnerabilities actually execute in production, so teams prioritize the ones that genuinely matter. Kodem's runtime-powered SCA identifies whether this CVE is reachable in your applications.

Already deployed Kodem?

See it in your environmentNew to Kodem? Get a demo →

Remediation advice

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.

Frequently Asked Questions

  1. What is CVE-2026-102831? CVE-2026-102831 is a high-severity cross-site scripting (XSS) vulnerability in jupyterlab (pip), affecting versions >= 4.6.0, <= 4.6.3. It is fixed in 4.6.4, 4.5.11, 7.6.3, 0.8.4. Untrusted input is rendered as active markup in a victim's browser, which can run script in their session.
  2. How severe is CVE-2026-102831? CVE-2026-102831 has a CVSS score of 8.1 (High). This score reflects the worst-case severity of the vulnerability, not your specific exposure. Whether it represents real risk in your environment depends on whether the vulnerable code is present and reachable.
  3. Which packages are affected by CVE-2026-102831?
    • jupyterlab (pip) (versions >= 4.6.0, <= 4.6.3)
    • notebook (pip) (versions >= 7.5.0, <= 7.6.2)
    • jupyterlite (pip) (versions >= 0.7.0, <= 0.8.3)
    • jupyterlite-core (pip) (versions >= 0.7.0, <= 0.8.3)
  4. Is there a fix for CVE-2026-102831? Yes. CVE-2026-102831 is fixed in 4.6.4, 4.5.11, 7.6.3, 0.8.4. Upgrade to this version or later.
  5. Is CVE-2026-102831 exploitable, and should I be worried? Whether CVE-2026-102831 is exploitable in your environment depends on whether the vulnerable code is present and reachable. A CVSS score is a worst-case rating; it does not account for your specific deployment, configuration, or usage patterns. Kodem, an Intelligent Application Security platform, uses runtime intelligence to show which vulnerabilities actually execute in production, so you can focus on the ones that represent real risk. Get a demo
  6. What actually determines whether CVE-2026-102831 is exploitable, and how bad it is? Exploitability and impact are not fixed properties of a CVE. They depend on runtime truth: whether the vulnerable code is present, reachable, and actually executes in your application. A high CVSS score on a dependency that never runs is not the same as real risk. Kodem, an Intelligent Application Security platform, uses runtime intelligence to reveal which vulnerabilities actually execute in production, so teams prioritize the ones that genuinely matter.
  7. How do I fix CVE-2026-102831?
    • Upgrade jupyterlab to 4.6.4 or later
    • Upgrade jupyterlab to 4.5.11 or later
    • Upgrade notebook to 7.6.3 or later
    • Upgrade jupyterlite to 0.8.4 or later
    • Upgrade jupyterlite-core to 0.8.4 or later

Other vulnerabilities in jupyterlab

Stop the waste.
Protect your environment with Kodem.