Stored XSS in Jupyter nbdime
jupyter nbdime
jupyter nbdime
≥ 6.0.0 · < 6.1.2
|
| nbdime-jupyterlab npm |
|
|
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.
From the CVE record · GitHub_M
Affected nbdime versions do not sanitize a notebook filename and path before displaying them in a checkpoint diff. An attacker can cause HTML in the name to be rendered when a user displays the diff; the input does not specify an authentication requirement.
Check installations of PyPI nbdime before 1.1.1, from 2.0.0 to before 2.1.1, or from 3.0.0 to before 3.1.1; npm nbdime before 5.0.2 or from 6.0.0 to before 6.1.2; and npm nbdime-jupyterlab before 1.0.1 or from 2.0.0 to before 2.1.1.