Description
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.
Fixed in Linux distributions
Distributions backport fixes, so the version that fixes this vulnerability differs per release — upgrade to at least the version shown. From the distributions' security trackers and advisories.
Debian
Security tracker ↗| Release | Package | Fixed in | Advisory |
|---|---|---|---|
| Debian 14 | jupyter-notebook | 5.7.4-1 | — |
| Debian 13 | jupyter-notebook | 5.7.4-1 | — |
| Debian 12 | jupyter-notebook | 5.7.4-1 | — |
| Debian 9 | jupyter-notebook | 4.2.3-4+deb9u1 | DLA-2432-1 |
Ubuntu
Security tracker ↗| Release | Package | Fixed in | Advisory |
|---|---|---|---|
| Ubuntu 22.04 LTS | jupyter-notebook | 6.4.8-1ubuntu0.1 | USN-5585-1 |
| Ubuntu 20.04 LTS | jupyter-notebook | 6.0.3-2ubuntu0.1 | USN-5585-1 |
| Ubuntu 18.04 LTS | jupyter-notebook | 5.2.2-1ubuntu0.1 | USN-5585-1 |
Affected packages
| Ecosystem | Package | Affected | Fixed | Record |
|---|---|---|---|---|
| PyPI | notebook | < 5.7.1 | 5.7.1 | GHSA-49qr-xh3w-h436 |
Advisories 2
- USN-5585-1 jupyter-notebook vulnerabilities Ubuntu Security Notices (USN) · Apr 27, 2026
- DLA-2432-1 jupyter-notebook - security update Debian Security (DSA / DLA) · Mar 9, 2026
References
- https://groups.google.com/forum/#%21topic/jupyter/hWzu2BSsplY
- https://pypi.org/project/notebook/#history
- https://github.com/jupyter/notebook/blob/master/docs/source/changelog.rst
- https://github.com/jupyter/notebook/commit/107a89fce5f413fb5728c1c5d2c7788e1fb17491
- [debian-lts-announce] 20201119 [SECURITY] [DLA 2432-1] jupyter-notebook security update mailing-list