Jupyter Server: Stored XSS in `NbconvertFileHandler` / `NbconvertPostHandler` via missing `sandbox` CSPGHSA-fcw5-x6j4-ccmp
MEDIUMFix: jupyter-server/jupyter_server@6cbee8dGHSA-fcw5-x6j4-ccmp is a medium-severity (CVSS 5.4) Cross-site Scripting (XSS) vulnerability in jupyter-server. A fix is available for jupyter-server — see the affected versions and patch details below.
Exploitation Status
No confirmed exploitation observed yet
- A successful exploit gives an attacker total control of the affected component, not partial access.
- CISA’s own triage has not observed active exploitation or public proof-of-concept code for this CVE as of its last assessment.
Exploitation and automatability from CISA’s SSVC triage for GHSA-fcw5-x6j4-ccmp.
EPSS Exploitation Probability
Probability of exploitation in the next 30 days, from FIRST.org EPSS.
How urgent is this, really
Where this sits among everything scored
Real-World Exposure
jupyter-serverReal-time download stats are indexed for npm and PyPI packages. This vulnerability affects PyPI packages — download data is not available via public APIs for these ecosystems.
Description
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:
import jupyter_server.nbconvert.handlers as _nb
def _csp(self):
return super(type(self), self).content_security_policy + "; sandbox allow-scripts"
_nb.NbconvertFileHandler.content_security_policy = property(_csp)
_nb.NbconvertPostHandler.content_security_policy = property(_csp)
Affected Packages
| Ecosystem | Package | Vulnerable range | Fix |
|---|---|---|---|
| 🐍PyPI | jupyter-server | all versions | 2.20.0pip install --upgrade 'jupyter-server==2.20.0' |
Affected Products
jupyter serverjupyterDetection & mitigation playbook
Open-source dependencyDetect
Scan your dependency tree (package-lock.json, pnpm-lock.yaml, requirements.txt, go.sum, etc.) for jupyter-server, including transitive dependencies — a direct dependency you never call can still pull in a vulnerable version.
Fix
Update jupyter-server to 2.20.0 or later, then make sure no transitive (indirect) dependency still pins the vulnerable range — O3 confirms GHSA-fcw5-x6j4-ccmp is resolved across your whole dependency graph.
Workarounds
Escape or sanitise the affected output on the server side rather than relying on client-side filtering, and add a Content-Security-Policy that blocks inline script execution so injected markup cannot run even if it reaches the page.
Fixing This On Your OS
If you run this on a Linux distribution, patch through your package manager against the distro's own security advisory below — it tracks the exact backported fix for your release, which can ship on a different timeline (and sometimes a different severity) than the upstream project.
| Product | Fixed in | Advisory |
|---|---|---|
| Red Hat Migration Toolkit for Applications 8.2 | mta/mta-solution-server-rhel9:1784109883 | RHSA-2026:43038 |
| Red Hat OpenShift AI 3.3 | rhoai/odh-workbench-jupyter-datascience-cpu-py312-rhel9:1790331087 | RHSA-2026:73987 |
| Red Hat OpenShift AI 3.4 | rhoai/odh-th06-cpu-torch210-py312-rhel9:1787076778 | RHSA-2026:60520 |
Frequently Asked Questions
Is GHSA-fcw5-x6j4-ccmp in your dependencies?
Find it across PyPI, including transitive dependencies.