Jupyter Notebook XSS via untrusted notebooks
CVE-2018-19351 · GHSA-49qr-xh3w-h436 · published 2018-11-21 · updated 2024-09-27
- Severity
- Medium
- CVSS score
- 6.1
- Chance of exploitation (EPSS)
- 1.5%
- Fixed in
- 5.7.1
Jupyter Notebook before 5.7.1 allows XSS via an untrusted notebook because nbconvert responses are considered to have the same origin as the notebook server. In other words, nbconvert endpoints can execute JavaScript with access to the server API. In notebook/nbconvert/handlers.py, NbconvertFileHandler and NbconvertPostHandler do not set a Content Security Policy to prevent this.
Upgrade notebook to 5.7.1 or later.
| Package | Registry | Affected | Fixed in |
|---|---|---|---|
| notebook | PyPI | < 5.7.1 | 5.7.1 |
- CriticalJupyter Server: Stored XSS in `NbconvertFileHandler` / `NbconvertPostHandler` via missing `sandbox` CSPjupyter-server
- CriticalMalicious website can execute commands on the local system through XSS in the OpenCode web UIopencode-ai
- CriticalFlowise is vulnerable to stored XSS via "View Messages" allows credential theft in FlowiseAI admin panelflowise
- CriticalMLFlow Cross-site Scripting vulnerability leads to client-side Remote Code Executionmlflow
- CriticalCross-site Scripting in MLFlowmlflow
- HighPraisonAI: Prompt Injection Defense Bypassed for HIGH-Level Threatspraisonai
- CriticalImproper Input Validation in Jupyter Notebookipython, notebook
- HighJupyterLab: Cross-site scripting (XSS) in JupyterLab via notebook cells pasted from the system clipboardjupyterlab, jupyterlab, notebook
- HighJupyterLab's command linker attributes in HTML enable one-click command execution from untrusted contentjupyterlab, notebook
- HighJupyter Notebook Vulnerable to Authentication Token Theft via CommandLinker XSSjupyterlab, notebook
- HighHTML injection in Jupyter Notebook and JupyterLab leading to DOM Clobberingjupyterlab, jupyterlab, notebook
- HighJupyterLab vulnerable to potential authentication and CSRF tokens leakjupyterlab, jupyterlab, notebook
The impact, patch and workaround text comes from the advisory, shortened (GitHub Advisory Database, CC BY 4.0). Proof-of-concept and reproduction sections and code are left out; the original advisory has them.