Advisory

PYSEC-2021-428

Also known as: CVE-2021-41134, GHSA-p6rw-44q7-3fw4

Summary

The record has no summary.

Details

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.

Severity

Not rated by the source.

Dates

Published
2021-11-03 18:15 UTC
Modified
2023-11-08 04:06 UTC

Affected packages and fixes

nbdime

PyPI · All systems

Affected

  • introduced 0, fixed 1.1.1, introduced 2.0.0, fixed 2.1.1, introduced 3.0.0, fixed 3.1.1 (ecosystem)

Fixed versions

1.1.1, 2.1.1, 3.1.1

Fix

  • Fixed version 1.1.1
    pip install --upgrade nbdime==1.1.1
  • Fixed version 2.1.1
    pip install --upgrade nbdime==2.1.1
  • Fixed version 3.1.1
    pip install --upgrade nbdime==3.1.1

Fix commands are the export's own generic commands. Ojuju never runs them. Check them against your setup first.

Check your own computer: guard packages check

View this record on OSV.dev

Source

Source: PyPA Advisory Database · CC BY 4.0

Sources & licences