SecOraLens
HighCVECVE-2026-102831

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

GitHub Security Advisories·Source published ·1 min read

What happened?

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

Key details

  • JupyterLab 4.5.0 introduced system clipboard support for copying and pasting notebook cells.
  • Trusted outputs containing script elements are evaluated in the JupyterLab origin, running attacker JavaScript.
  • The executed script can access the Jupyter Server REST API as the authenticated user, enabling file read/write and code execution.
  • Only code cell outputs can trigger script execution; markdown and raw cells are always sanitized.
  • Attackers need no JupyterLab account or server access, only the user's clipboard at paste time.

Summarised by SecOraLens from GitHub Security Advisories. Always read the original source before acting. How SecOraLens verifies advisories.