Jupyter Server fixes stored XSS in nbconvert HTML rendering
Jupyter Server disclosed and fixed a stored cross-site scripting flaw in NbconvertFileHandler and NbconvertPostHandler that affects versions up to and including 2.19.0. The issue stems from nbconvert endpoints rendering user-authored notebook HTML under the Jupyter origin without a sandbox directive in the Content-Security-Policy, while nbconvert.HTMLExporter does not sanitize HTML by default. An attacker can place malicious HTML in notebook display_data output and trigger script execution when an authenticated user opens /nbconvert/html/<path>.
Successful exploitation could expose tokens and cookies, grant access to Jupyter /api/* endpoints, and potentially enable remote code execution through kernels. The project addressed the issue in jupyter-server 2.20.0 by adding sandbox allow-scripts to the CSP header for rendered nbconvert HTML in both GET and POST handlers, isolating any JavaScript in a unique origin. The mitigation is enabled by default through the new ServerApp.nbconvert_csp_sandbox setting, and the change is documented and covered by tests; a configuration-based workaround is also available for deployments that cannot easily patch source files.

Get ahead of threats like this
Mallory correlates global threat intelligence with your attack surface — know if you’re exposed before adversaries strike.
How this story unfolded
1 event from the most recent confirmed update back to the earliest known activity.
Jupyter Server fixes stored XSS in v2.20.0
A security advisory disclosed a stored cross-site scripting vulnerability in Jupyter Server nbconvert handlers affecting versions up to and including 2.19.0. The issue was fixed in Jupyter Server v2.20.0 by adding a Content-Security-Policy sandbox directive for rendered nbconvert HTML, with a new configuration option controlling the behavior.
Sources
2 references tracked. Mallory keeps watching after this page renders.
Merge commit from fork · jupyter-server/jupyter_server@6cbee8d · GitHub
github.com
Open sourceStored XSS in `NbconvertFileHandler` / `NbconvertPostHandler` via missing `sandbox` CSP · Advisory · jupyter-server/jupyter_server · GitHub
github.com
Open sourceSee the full picture, correlated to your attack surface.
Map indicators from this story to your assets and identify affected systems in minutes.
Every observed campaign, victim, and pivot linked to actors named in this story.
Malware, exploits, and IOCs connected to the activity described here.
YARA, Sigma, and Snort rules deployed to your SIEM as soon as they’re published.
Get matching new stories delivered to your team as they break — not the next morning.
Ask questions about this story and take action on the answers.


