CVE-2021-41134: Stored XSS in Jupyter nbdime
Impact
Improper handling of user controlled input caused a stored cross-site scripting (XSS) vulnerability. All previous versions of nbdime are affected.
Patches
Security patches will be released for each of the major versions of the nbdime packages since version 1.x of the nbdime python package.
Python - nbdime 1.x: Patched in v. 1.1.1 - nbdime 2.x: Patched in v. 2.1.1 - nbdime 3.x: Patched in v. 3.1.1
npm - nbdime 6.x version: Patched in 6.1.2 - nbdime 5.x version: Patched in 5.0.2 - nbdime-jupyterlab 1.x version: Patched in 1.0.1 - nbdime-jupyterlab 2.x version: Patched in 2.1.1
For more information If you have any questions or comments about this advisory email us at security@ipython.org.
Other sources
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.
— MITRE
Affected Software
Remediation
Event History
Frequently Asked Questions
What is CVE-2021-41134?
CVE-2021-41134 is a stored cross-site scripting (XSS) vulnerability in the Jupyter Nbdime project.
Which versions of nbdime are affected by CVE-2021-41134?
Versions 1.0.0 to 1.1.1, 2.0.0 to 2.1.1, 3.0.0 to 3.1.1 of nbdime are affected by CVE-2021-41134.
How severe is CVE-2021-41134?
CVE-2021-41134 has a severity score of 5.4 (high).
How do I fix CVE-2021-41134?
To fix CVE-2021-41134, upgrade to a version of nbdime that is not affected by the vulnerability.
Where can I find more information about CVE-2021-41134?
You can find more information about CVE-2021-41134 in the Jupyter Nbdime project's GitHub repository and security advisories.