CVE-2021-41134
Stored XSS in Jupyter nbdime
Also known as GHSA-p6rw-44q7-3fw4, PYSEC-2021-428
Mitigation
- Upgrade nbdime to one of 1.1.1, 2.1.1, 3.1.1 (or later in the same release line).
- Upgrade nbdime to one of 5.0.2, 6.1.2 (or later in the same release line).
- Upgrade nbdime-jupyterlab to one of 1.0.1, 2.1.1 (or later in the same release line).
Who should check
- Projects that depend on PyPI package nbdime (< 1.1.1)
- Projects that depend on npm package nbdime (< 5.0.2)
- Projects that depend on npm package nbdime-jupyterlab (< 1.0.1)
- Anyone running jupyter nbdime < 1.1.1 - nbdime (pip); >= 2.0.0 , < 2.1.1 - nbdime (pip); >= 3.0.0, < 3.1.1 - nbdime (pip); < 5.0.2 - nbdime (npm); >= 6.0.0, < 6.1.2 - nbdime (npm); < 1.0.1 - nbdime-jupyterlab (npm); >= 2.0.0, < 2.1.1 - nbdime-jupyterlab (npm)
Vulnerability facts
- Affected
- nbdime < 1.1.1; nbdime < 5.0.2; nbdime-jupyterlab < 1.0.1
- Fixed in
- 1.1.1, 2.1.1, 3.1.1, 5.0.2, 6.1.2, 1.0.1
- Exploited in the wild
- Not in CISA KEV
- Public exploit / PoC
- None known
- Remote exploitation
- Remote, login needed
- CVSS
- 8.7 (v3.1, CNA)CVSS:3.1/AV:N/AC:L/PR:L/UI:R/S:C/C:H/I:H/A:NOpen in CVSS calculator
Show all 8 CVSS metrics
- Attack vector: Network
- Attack complexity: Low
- Privileges required: Low
- User interaction: Required
- Scope: Changed (impact reaches other components)
- Confidentiality impact: High
- Integrity impact: High
- Availability impact: None
- EPSS
- 0.70% chance of exploitation in 30 days (percentile 49, 2026-11-26)
- CWE
- CWE-79
- Modified
Description
nbdime provides tools for diffing and merging of Jupyter Notebooks. In affected versions a stored cross-site scripting (XSS) issue exists within the Jupyter-owned nbdime project. It appears that when reading the file name and path from disk, the extension does not sanitize the string it constructs before returning it to be displayed. The diffNotebookCheckpoint function within nbdime causes this issue. When attempting to display the name of the local notebook (diffNotebookCheckpoint), nbdime appears to simply append .ipynb to the name of the input file. The NbdimeWidget is then created, and the base string is passed through to the request API function. From there, the frontend simply renders the HTML tag and anything along with it. Users are advised to patch to the most recent version of the affected product.
Affected and fixed versions
| Package / product | Affected | Fixed | Source |
|---|---|---|---|
| PyPI nbdime | < 1.1.1 | 1.1.1, 2.1.1, 3.1.1 | osv |
| npm nbdime | < 5.0.2 | 5.0.2, 6.1.2 | osv |
| npm nbdime-jupyterlab | < 1.0.1 | 1.0.1, 2.1.1 | osv |
| jupyter nbdime | < 1.1.1 - nbdime (pip); >= 2.0.0 , < 2.1.1 - nbdime (pip); >= 3.0.0, < 3.1.1 - nbdime (pip); < 5.0.2 - nbdime (npm); >= 6.0.0, < 6.1.2 - nbdime (npm); < 1.0.1 - nbdime-jupyterlab (npm); >= 2.0.0, < 2.1.1 - nbdime-jupyterlab (npm) | — | cvelist |
Check your systems with an agent
Paste this into Claude Code, Cursor or another coding agent. It only reads; it changes nothing.
Check whether anything I run is affected by CVE-2021-41134. Work read-only: do not install, upgrade, delete or change anything. Details: https://flawdb.com/CVE-2021-41134.md Affected: nbdime < 1.1.1; nbdime < 5.0.2; nbdime-jupyterlab < 1.0.1 Fixed in: 1.1.1, 2.1.1, 3.1.1, 5.0.2, 6.1.2, 1.0.1 Steps: 1. Search this machine and project for nbdime (PyPI), nbdime (npm), nbdime-jupyterlab (npm), jupyter nbdime: dependency manifests and lockfiles, installed packages, container images and running services. 2. For each match, note the installed version and whether it is inside the affected range. 3. Report a table: location, installed version, affected (yes / no / unsure), evidence. If affected, say which fixed version or mitigation from the details link applies, but don't apply it.
References
Vendor advisories
FAQ
Is CVE-2021-41134 being exploited?
There is no confirmed exploitation: CVE-2021-41134 is not in the CISA Known Exploited Vulnerabilities catalog. No public exploit code is known. EPSS estimates a 0.70% chance of exploitation in the next 30 days (as of 2026-11-26).
How serious is CVE-2021-41134?
High: CVSS 8.7 (v3.1, scored by CNA). Remote, login needed. A user has to take an action, such as opening a link, for the attack to work.
Which versions are affected by CVE-2021-41134?
nbdime < 1.1.1; nbdime < 5.0.2; nbdime-jupyterlab < 1.0.1.
Is there a fix for CVE-2021-41134?
Yes. Fixed in 1.1.1, 2.1.1, 3.1.1, 5.0.2, 6.1.2, 1.0.1. Upgrade nbdime to one of 1.1.1, 2.1.1, 3.1.1 (or later in the same release line). Upgrade nbdime to one of 5.0.2, 6.1.2 (or later in the same release line). Upgrade nbdime-jupyterlab to one of 1.0.1, 2.1.1 (or later in the same release line).
How do I check if I'm affected by CVE-2021-41134?
Find where you use the affected software (dependency lockfiles, installed packages, container images, servers) and compare the installed version with the affected range above. The agent prompt on this page does this read-only.