CVE-2021-41134Jupyter Nbdime
Medium 5.4
Follow: this CVE · Jupyter · Jupyter Nbdime We alert you by email or Slack (account required).
- Priority
- 32
- CVSS 3.1
- 5.4
- EPSS
- 0.7% probability of exploitation in 30 days · percentile 49
- Auth required
- Yes
- Published
- Nov 3, 2021
- Updated
- Jun 17, 2026
- Category
- Application · Cross-platform
- Weakness (CWE)
- CWE-79
- Vector
CVSS:3.1/AV:N/AC:L/PR:L/UI:R/S:C/C:L/I:L/A:N
What happens
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.
What to do
- Apply the vendor's security update for Nbdime.
Affected packages
| Ecosystem | Package | Affected versions | Fixed in | How to upgrade |
|---|---|---|---|---|
| PyPI | nbdime |
< 1.1.1 |
1.1.1 |
pip install "nbdime>=1.1.1" |
| PyPI | nbdime |
≥ 2.0.0 < 2.1.1 |
2.1.1 |
pip install "nbdime>=2.1.1" |
| PyPI | nbdime |
≥ 3.0.0 < 3.1.1 |
3.1.1 |
pip install "nbdime>=3.1.1" |
| PyPI | nbdime |
< 1.1.1 |
1.1.1 |
pip install "nbdime>=1.1.1" |
| PyPI | nbdime |
≥ 2.0.0 < 2.1.1 |
2.1.1 |
pip install "nbdime>=2.1.1" |
| PyPI | nbdime |
≥ 3.0.0 < 3.1.1 |
3.1.1 |
pip install "nbdime>=3.1.1" |
| npm | nbdime |
< 5.0.2 |
5.0.2 |
npm install nbdime@5.0.2 |
| npm | nbdime |
≥ 6.0.0 < 6.1.2 |
6.1.2 |
npm install nbdime@6.1.2 |
| npm | nbdime-jupyterlab |
< 1.0.1 |
1.0.1 |
npm install nbdime-jupyterlab@1.0.1 |
| npm | nbdime-jupyterlab |
≥ 2.0.0 < 2.1.1 |
2.1.1 |
npm install nbdime-jupyterlab@2.1.1 |
Per OSV / GitHub Advisories (GHSA-p6rw-44q7-3fw4, PYSEC-2021-428). Check the version in your lockfile before upgrading.
Affected products (CPE)
| Vendor | Product | Versions |
|---|---|---|
| jupyter | nbdime | ≥ 1.0.0 < 1.1.1 |
| jupyter | nbdime | ≥ 2.0.0 < 2.1.1 |
| jupyter | nbdime | ≥ 3.0.0 ≤ 3.1.1 |
| jupyter | nbdime | ≥ 5.0.0 < 5.0.2 |
| jupyter | nbdime | ≥ 6.0.0 < 6.1.2 |
| jupyter | nbdime-jupyterlab | ≥ 1.0.0 < 1.0.1 |
| jupyter | nbdime-jupyterlab | ≥ 2.0.0 < 2.1.1 |
Official sources
References
Links published by the sources. Open them with care.
- github.com Patch Third Party Advisory
- github.com Third Party Advisory