JupyterLab: Cross-site scripting (XSS) in JupyterLab via notebook cells pasted from the system clipboard
jupyterlab · jupyterlab notebook · jupyterlab jupyterlite-core
Affected versions
| Product | Affected | Fixed in |
|---|---|---|
| jupyterlab PyPI |
|
|
| notebook PyPI |
|
|
jupyterlab · jupyterlab notebook · jupyterlab jupyterlite-core
| Product | Affected | Fixed in |
|---|---|---|
| jupyterlab PyPI |
|
|
| notebook PyPI |
|
|
| jupyterlite PyPI |
|
|
| jupyterlite-core PyPI |
|
|
JupyterLab is an extensible environment for interactive and reproducible computing, based on the Jupyter Notebook Architecture. From JupyterLab 4.5.0 until 4.5.11 and 4.6.4, from Notebook 7.5.0 until 7.6.3, and from JupyterLite Core 0.7.0 until 0.8.4, the system clipboard cell-paste path accepts attacker-controlled cell JSON without clearing metadata.trusted. When useSystemClipboardForCells is active and pasteCodeCellsWithoutOutput is disabled, a pasted code cell can mark HTML output as trusted, bypass output sanitization, and execute script in the authenticated JupyterLab origin without executing the cell. Markdown and raw cells are not affected because their output is sanitized. This issue is fixed in JupyterLab 4.5.11 and 4.6.4, Notebook 7.6.3, and JupyterLite Core 0.8.4.
From the CVE record · GitHub_M
The system clipboard cell-paste path in affected JupyterLab, Notebook, and JupyterLite Core versions accepts attacker-controlled code-cell JSON without clearing its trusted flag. If an authenticated user pastes such a cell while useSystemClipboardForCells is active and pasteCodeCellsWithoutOutput is disabled, its HTML output can bypass sanitization and run script in the authenticated JupyterLab origin without the cell being executed.
Check installations of PyPI jupyterlab 4.5.0–<4.5.11 or 4.6.0–<4.6.4, notebook 7.5.0–<7.6.3, and jupyterlite or jupyterlite-core 0.7.0–<0.8.4.