Jupyter Notebook XSS via untrusted notebooks
Summary
CVE-2018-19351: Jupyter Notebook XSS via untrusted notebooks. Affects notebook versions < 5.7.1. Fixed in 5.7.1. How to fix ↓
Also tracked for
- jupyter-notebook · Debian:11
The same CVE-2018-19351 is tracked separately for each ecosystem and vendor. Its fix information is the same; the package and affected versions differ.
Check if this vulnerability affects your application
Upload a manifest or SBOM and we'll show whether you're affected, plus every other risky package in the same scan.
No signup required · Results in about 60 seconds
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.
How To Fix
Latest published version: 7.6.3 as of 22 Oct 2026
pip install --upgrade "notebook==7.6.3"
Upgrading to it may include breaking changes; the version below is the minimum fixed release for this vulnerability.
If you need the minimum change
5.7.1
This is the first release that contains the fix.
pip install --upgrade "notebook==5.7.1"
Tip — Not sure which version your app runs? Vulert can match this fix to it. Scan free →
Related vulnerabilities
Recent vulnerabilities recorded for notebook.