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

- Severity: High 8.7 (CVSS:3.1, scored by GitHub_M) `CVSS:3.1/AV:N/AC:L/PR:L/UI:R/S:C/C:H/I:H/A:N`
- Known to be exploited: not in CISA's catalogue, which lists only what CISA has confirmed
- Likelihood of exploitation in the next 30 days (EPSS): 0.70%, higher than 54% of CVEs (2026-12-01)
- Published: 2021-11-03T17:50:10.000Z
- Modified: 2026-07-08T06:27:23.429Z
- Also known as: GHSA-p6rw-44q7-3fw4, PYSEC-2021-428
- Weaknesses: CWE-79
- Assigned by: GitHub_M

## 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.

(As written by CVE List.)

## Affected

- 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); from 1.0.0 before 1.1.1; from 2.0.0 before 2.1.1; from 3.0.0 up to 3.1.1; from 5.0.0 before 5.0.2; from 6.0.0 before 6.1.2
- nbdime (PyPI): before 1.1.1; from 2.0.0 before 2.1.1; from 3.0.0 before 3.1.1; before e44a5cc7677f24b45ebafc756db49058c2f750ea
- nbdime (npm): before 5.0.2; from 6.0.0 before 6.1.2
- nbdime-jupyterlab (npm): before 1.0.1; from 2.0.0 before 2.1.1
- jupyter nbdime-jupyterlab: from 1.0.0 before 1.0.1; from 2.0.0 before 2.1.1

## Every score

- GitHub_M: CVSS:3.1 8.7 High `CVSS:3.1/AV:N/AC:L/PR:L/UI:R/S:C/C:H/I:H/A:N`
- GitHub: CVSS:3.1 8.7 Medium `CVSS:3.1/AV:N/AC:L/PR:L/UI:R/S:C/C:H/I:H/A:N`
- GitHub: CVSS:4.0 Medium `CVSS:4.0/AV:N/AC:L/AT:N/PR:L/UI:P/VC:N/VI:N/VA:N/SC:H/SI:H/SA:N`
- NVD: CVSS:3.1 5.4 Medium `CVSS:3.1/AV:N/AC:L/PR:L/UI:R/S:C/C:L/I:L/A:N`
- NVD: CVSS:2.0 3.5 Low `AV:N/AC:M/Au:S/C:N/I:P/A:N`

## References

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

## Sources

- CVE List: [CVE-2021-41134](https://www.cve.org/CVERecord?id=CVE-2021-41134), CVE Terms of Use, modified 2024-08-04
- GitHub Advisory Database: [GHSA-p6rw-44q7-3fw4](https://github.com/advisories/GHSA-p6rw-44q7-3fw4), CC-BY-4.0, modified 2026-07-08
- NVD: [CVE-2021-41134](https://nvd.nist.gov/vuln/detail/CVE-2021-41134), Public domain, modified 2026-06-17
- PyPA Advisory Database: [PYSEC-2021-428](https://osv.dev/vulnerability/PYSEC-2021-428), CC-BY-4.0, modified 2023-11-08

---

Page: https://cve.day/CVE-2021-41134 · Whole record: https://cve.day/CVE-2021-41134.json · Rebuilt by cve.day 2026-11-25T22:58:05.334Z
