# CVE-2021-41134: Stored XSS in Jupyter nbdime

- Priority: **Routine**
- Reason: Not severe (CVSS 8.7, network access); no exploitation reported by the 5 checked sources
- Next step: Fix in the normal cadence
- Status: published
- Published: 2021-11-03 · Modified: 2024-08-04
- Aliases: GHSA-p6rw-44q7-3fw4, PYSEC-2021-428
- Record: https://cvemate.com/vulnerability/CVE-2021-41134 · JSON: https://cvemate.com/vulnerability/CVE-2021-41134/json

## Description

```text
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.
```

## Signals

- CVSS: 8.7 high (v3.1, CVE.org) CVSS:3.1/AV:N/AC:L/PR:L/UI:R/S:C/C:H/I:H/A:N
- EPSS: 0.703%, percentile 54.654%, as of 2026-12-04
- Known exploited (KEV): CISA not listed, ENISA not listed, CIRCL not listed
- Ransomware use: none recorded
- Public exploits: 0

## Affected

- jupyter nbdime: \< 1.1.1 - nbdime (pip) \| ≥ 2.0.0 , \< 2.1.1 - nbdime (pip) (No fix recorded) \| ≥ 3.0.0, \< 3.1.1 - nbdime (pip) (No fix recorded) \| \< 5.0.2 - nbdime (npm) \| ≥ 6.0.0, \< 6.1.2 - nbdime (npm) (No fix recorded) \| \< 1.0.1 - nbdime-jupyterlab (npm) \| ≥ 2.0.0, \< 2.1.1 - nbdime-jupyterlab (npm) (No fix recorded) \| ≥ 1.0.0, \< 1.1.1 \| ≥ 2.0.0, \< 2.1.1 \| ≥ 3.0.0, ≤ 3.1.1 \| ≥ 5.0.0, \< 5.0.2 \| ≥ 6.0.0, \< 6.1.2
- jupyter nbdime-jupyterlab: ≥ 1.0.0, \< 1.0.1 \| ≥ 2.0.0, \< 2.1.1
- Npm nbdime (Npm): \< 5.0.2 \| ≥ 6.0.0, \< 6.1.2
- Npm nbdime-jupyterlab (Npm): \< 1.0.1 \| ≥ 2.0.0, \< 2.1.1
- PyPI nbdime (PyPI): \< 1.1.1 \| ≥ 2.0.0, \< 2.1.1 \| ≥ 3.0.0, \< 3.1.1 \| \< e44a5cc7677f24b45ebafc756db49058c2f750ea

## References

- <https://github.com/jupyter/nbdime/security/advisories/GHSA-p6rw-44q7-3fw4>
- <https://github.com/jupyter/nbdime/commit/e44a5cc7677f24b45ebafc756db49058c2f750ea>
- <https://nvd.nist.gov/vuln/detail/CVE-2021-41134>
- <https://github.com/jupyter/nbdime>
- <https://github.com/pypa/advisory-database/tree/main/vulns/nbdime/PYSEC-2021-428.yaml>

---

Data as of 2026-12-05T10:27:57.280Z. The priority label is CveMate's own model from public evidence, not an official rating, and it knows nothing about your assets. How labels are decided: https://cvemate.com/faq#priority
