CVE-2021-41134
Stored XSS in Jupyter nbdime
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.
How to fix CVE-2021-41134
To remediate CVE-2021-41134, upgrade the affected package to a fixed version below.
- —upgrade to 5.0.2 or later
- —upgrade to 1.0.1 or later
- —upgrade to 1.1.1 or later
- —upgrade to e44a5cc7677f24b45ebafc756db49058c2f750ea or later
Is CVE-2021-41134 being exploited?
Low — EPSS is 0.3%, meaning exploitation activity has not been observed at scale.
Affected packages (4)
- from 0, < 5.0.2
- from 0, < 1.0.1
- from 0, < 1.1.1
- from 0, < e44a5cc7677f24b45ebafc756db49058c2f750ea | from 0, < 1.1.1, >= 2.0.0, < 2.1.1, >= 3.0.0, < 3.1.1
CVSS scores
| Source | Version | Severity | Vector |
|---|---|---|---|
| osv | CVSS 4.0 | — | 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 |
| osv | CVSS 3.1 | HIGH8.7 | CVSS:3.1/AV:N/AC:L/PR:L/UI:R/S:C/C:H/I:H/A:N |