Skip to content

CVE-2021-41134 Stored XSS in Jupyter nbdime

MediumCVSS 5.4 EPSS 0.70%
Published
Updated
Exploit status
No public exploit known

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.

Upgrade path

5 packages: 5 fixed.

PackageAffectedFixed inStatus
jupyter nbdime = < 1.0.1 - nbdime-jupyterlab (npm); = < 1.1.1 - nbdime (pip); = < 5.0.2 - nbdime (npm); = >= 2.0.0 , < 2.1.1 - nbdime (pip) +8 more 1.1.1, 2.1.1, 5.0.2, 6.1.2 Fixed
jupyter nbdime-jupyterlab >= 1.0.0, < 1.0.1; >= 2.0.0, < 2.1.1 1.0.1, 2.1.1 Fixed
npm nbdime(npm) < 5.0.2; >= 6.0.0, < 6.1.2 5.0.2, 6.1.2 Fixed
npm nbdime-jupyterlab(npm) < 1.0.1; >= 2.0.0, < 2.1.1 1.0.1, 2.1.1 Fixed
pypi nbdime(PyPI) < 1.1.1; = 0.1.0; = 0.1.0.dev; = 0.1.0b1 +23 more 1.1.1, 2.1.1, 3.1.1 Fixed

Affected products

ProductAffected versionsFixed in
pypi nbdime(PyPI) < 1.1.1 1.1.1
pypi nbdime(PyPI) = 0.1.0 No fix listed
pypi nbdime(PyPI) = 0.1.0.dev No fix listed
pypi nbdime(PyPI) = 0.1.0b1 No fix listed
pypi nbdime(PyPI) = 0.1.1 No fix listed
pypi nbdime(PyPI) = 0.1.2 No fix listed
pypi nbdime(PyPI) = 0.2.0 No fix listed
pypi nbdime(PyPI) = 0.3.0 No fix listed
pypi nbdime(PyPI) = 0.4.0 No fix listed
pypi nbdime(PyPI) = 0.4.1 No fix listed
pypi nbdime(PyPI) = 1.0.0 No fix listed
pypi nbdime(PyPI) = 1.0.0rc0 No fix listed
pypi nbdime(PyPI) = 1.0.0rc1 No fix listed
pypi nbdime(PyPI) = 1.0.1 No fix listed
pypi nbdime(PyPI) = 1.0.2 No fix listed
pypi nbdime(PyPI) = 1.0.3 No fix listed
pypi nbdime(PyPI) = 1.0.4 No fix listed
pypi nbdime(PyPI) = 1.0.5 No fix listed
pypi nbdime(PyPI) = 1.0.6 No fix listed
pypi nbdime(PyPI) = 1.0.7 No fix listed
pypi nbdime(PyPI) = 1.1.0 No fix listed
pypi nbdime(PyPI) >= 2.0.0, < 2.1.1 2.1.1
pypi nbdime(PyPI) = 2.0.0 No fix listed
pypi nbdime(PyPI) = 2.1.0 No fix listed
pypi nbdime(PyPI) >= 3.0.0, < 3.1.1 3.1.1
Show 20 more
ProductAffected versionsFixed in
pypi nbdime(PyPI) = 3.0.0 No fix listed
pypi nbdime(PyPI) = 3.1.0 No fix listed
npm nbdime(npm) < 5.0.2 5.0.2
npm nbdime(npm) >= 6.0.0, < 6.1.2 6.1.2
npm nbdime-jupyterlab(npm) < 1.0.1 1.0.1
npm nbdime-jupyterlab(npm) >= 2.0.0, < 2.1.1 2.1.1
jupyter nbdime >= 1.0.0, < 1.1.1 1.1.1
jupyter nbdime >= 2.0.0, < 2.1.1 2.1.1
jupyter nbdime >= 3.0.0, <= 3.1.1 No fix listed
jupyter nbdime >= 5.0.0, < 5.0.2 5.0.2
jupyter nbdime >= 6.0.0, < 6.1.2 6.1.2
jupyter nbdime-jupyterlab >= 1.0.0, < 1.0.1 1.0.1
jupyter nbdime-jupyterlab >= 2.0.0, < 2.1.1 2.1.1
jupyter nbdime = < 1.1.1 - nbdime (pip) No fix listed
jupyter nbdime = >= 2.0.0 , < 2.1.1 - nbdime (pip) No fix listed
jupyter nbdime = >= 3.0.0, < 3.1.1 - nbdime (pip) No fix listed
jupyter nbdime = < 5.0.2 - nbdime (npm) No fix listed
jupyter nbdime = >= 6.0.0, < 6.1.2 - nbdime (npm) No fix listed
jupyter nbdime = < 1.0.1 - nbdime-jupyterlab (npm) No fix listed
jupyter nbdime = >= 2.0.0, < 2.1.1 - nbdime-jupyterlab (npm) No fix listed

References