Jupyter Server: Stored XSS in `NbconvertFileHandler` / `NbconvertPostHandler` via missing `sandbox` CSP
Critical severity
GitHub Reviewed
Published
Jun 17, 2026
in
jupyter-server/jupyter_server
•
Updated Aug 28, 2026
Description
Published to the GitHub Advisory Database
Jun 18, 2026
Reviewed
Jun 18, 2026
Published by the National Vulnerability Database
Jun 22, 2026
Last updated
Aug 28, 2026
The nbconvert HTTP handlers in jupyter_server render user-authored notebook HTML under the Jupyter origin without a sandbox directive in their
Content-Security-Policy.Combined with
nbconvert.HTMLExporter's default non-sanitizing behavior, a notebook carrying an HTML payload in a display_data output triggers stored XSS with cookie access, full /api/* authority, and kernel RCE.Impact
An authenticated victim who navigates to
/nbconvert/html/<path>containing attacker-authored output can have their token exfiltrated to another domain because it is executed in the Jupyter origin.Patches
Fixed in v2.20.0, commit 6cbee8d
Workarounds
For deployments where editing the installed jupyter_server is impractical (containerized builds, read-only images), adding this to jupyter_server_config.py has the same effect as the patch above without touching source files:
References