CVE-2021-41134 json
Stored XSS in Jupyter nbdime
published 2021-11-03 5 y ago modified 2026-07-08 4 mo ago also GHSA-p6rw-44q7-3fw4 , PYSEC-2021-428 , EUVD-2021-0140
- cvss
- 8.7
- version 3.1, CNA
- cisa kev
- Not listed
- not in CISA's catalog
- epss
- 0.7%
- EPSS 0.7% chance of exploitation in 30 days, percentile 53%
- public exploits
- 0
- none known
Summary
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.
Patch / fix
- pypi nbdime 1.1.1, 2.1.1, 3.1.1
- npm nbdime 5.0.2, 6.1.2
- npm nbdime-jupyterlab 1.0.1, 2.1.1
- jupyter nbdime 1.1.1, 2.1.1, 5.0.2, 6.1.2
- jupyter nbdime-jupyterlab 1.0.1, 2.1.1
Vendor advisories
What the vendors themselves say about their products: affected, fixed or not affected, and what to do.
red hat product security vex CVE-2021-41134 updated cvss 8.7
nbdime: diffNotebookCheckpoint does not sanitize strings before displaying
-
Red Hat All currently supported Red Hat productsnot affected: vulnerable code not present
Red Hat CSAF VEX © Red Hat, Inc., from https://security.access.redhat.com/data/csaf/v2/vex/; changed: reduced to product statuses and remediations. CC BY 4.0 · csaf
Exploit prediction
0.70% chance of exploitation in the next 30 days, higher than 53% of all scored CVEs (FIRST EPSS, 2026-11-08).
CVSS scores
| assigned by | version | score | vector |
|---|---|---|---|
| CNA | 3.1 | 8.7 | CVSS:3.1/AV:N/AC:L/PR:L/UI:R/S:C/C:H/I:H/A:N |
| NVD | 3.1 | 5.4 | CVSS:3.1/AV:N/AC:L/PR:L/UI:R/S:C/C:L/I:L/A:N |
| NVD | 2.0 | 3.5 | AV:N/AC:M/Au:S/C:N/I:P/A:N |
| GitHub | 3.1 | 8.7 | CVSS:3.1/AV:N/AC:L/PR:L/UI:R/S:C/C:H/I:H/A:N |
Affected packages
| ecosystem | package | affected | fixed in |
|---|---|---|---|
| pypi | nbdime | <1.1.1 >=2.0.0, <2.1.1 >=3.0.0, <3.1.1 |
1.1.1 2.1.1 3.1.1 |
| npm | nbdime | <5.0.2 >=6.0.0, <6.1.2 |
5.0.2 6.1.2 |
| npm | nbdime-jupyterlab | <1.0.1 >=2.0.0, <2.1.1 |
1.0.1 2.1.1 |
Affected products
- jupyter nbdime
Classification
- Weakness
-
- CWE-79 Improper Neutralization of Input During Web Page Generation
References
-
github.com
/jupyter/nbdime/commit/e44a5cc7677f24b45ebafc756db49058c2f750ea
web, patch, third-party-advisory
-
github.com
/jupyter/nbdime/security/advisories/GHSA-p6rw-44q7-3fw4
web, third-party-advisory, advisory
-
nvd.nist.gov
/vuln/detail/CVE-2021-41134
advisory
-
github.com
/jupyter/nbdime
package
-
github.com
/pypa/advisory-database/tree/main/vulns/nbdime/PYSEC-2021-428.yaml
web
Sources
- CVE List CVE-2021-41134
- GitHub Advisory GHSA-p6rw-44q7-3fw4
- NVD CVE-2021-41134
- OSV PYSEC-2021-428
Fencer Vulns keeps one entry per vulnerability: the CVE id wins, then GHSA, and records that alias each other are merged, except that two CVEs always keep separate entries. The same data is available as JSON.