CVE-2024-22420 is a medium-severity (CVSS 6.5) Cross-site Scripting (XSS) vulnerability in jupyterlab. A fix is available for jupyterlab — see the affected versions and patch details below.
Stored cross site scripting in Markdown Preview in JupyterLab
Exploitation Status
No confirmed exploitation observed yet
- 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 CVE-2024-22420.
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
jupyterlab🐍notebookReal-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
Impact
The vulnerability depends on user interaction by opening a malicious notebook with Markdown cells, or Markdown file using JupyterLab preview feature.
A malicious user can access any data that the attacked user has access to as well as perform arbitrary requests acting as the attacked user.
Patches
JupyterLab v4.0.11 was patched.
Workarounds
Users can either disable the table of contents extension by running:
jupyter labextension disable @jupyterlab/toc-extension:registry
References
Vulnerability reported via the bug bounty program sponsored by the European Commission and hosted on the Intigriti platform.
Affected Packages
| Ecosystem | Package | Vulnerable range | Fix |
|---|---|---|---|
| 🐍PyPI | jupyterlab | ≥ 4.0.0&&< 4.0.11 | 4.0.11pip install --upgrade 'jupyterlab==4.0.11' |
| 🐍PyPI | notebook | ≥ 7.0.0&&< 7.0.7 | 7.0.7pip install --upgrade 'notebook==7.0.7' |
Affected Products
fedorafedoraprojectjupyterlabjupyternotebookjupyterDetection & mitigation playbook
Open-source dependencyDetect
Scan your dependency tree (package-lock.json, pnpm-lock.yaml, requirements.txt, go.sum, etc.) for jupyterlab, including transitive dependencies — a direct dependency you never call can still pull in a vulnerable version.
Fix
Update jupyterlab to 4.0.11 or later, then make sure no transitive (indirect) dependency still pins the vulnerable range — O3 confirms CVE-2024-22420 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.
Frequently Asked Questions
Is CVE-2024-22420 in your dependencies?
Find it across PyPI, including transitive dependencies.