Stored XSS in Jupyter nbdime
Key facts
- Attack vector
- Network
- Privileges required
- Low
- User interaction
- Required
- Attack complexity
- Low
- Impact type
- Cross-site scripting
- Confidentiality · integrity · availability
- High · High · None
- Fix status
- Fixed
Attack profile from CVSS 3.1 · CNA. Fix status from CNA and GitHub. Impact type from CWE-79.
Summary
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.
Why it matters now
SSVC decision points
Not available: CISA has not published SSVC decision points for this record.
Affected products
| Vendor | Product | Affected versions | Fixed in | Status | Source |
|---|---|---|---|---|---|
| jupyterlab | nbdime | < 1.1.1 - nbdime (pip); >= 2.0.0 , < 2.1.1 - nbdime (pip); >= 3.0.0, < 3.1.1 - nbdime (pip); < 5.0.2 - nbdime (npm); >= 6.0.0, < 6.1.2 - nbdime (npm); < 1.0.1 - nbdime-jupyterlab (npm); >= 2.0.0, < 2.1.1 - nbdime-jupyterlab (npm) | — | No fix listed | CNA |
| — | nbdime (PyPI) | before 1.1.1 | 1.1.1 | Patch available | GHSA-p6rw-44q7-3fw4 |
| — | nbdime (PyPI) | 2.0.0 to before 2.1.1 | 2.1.1 | Patch available | GHSA-p6rw-44q7-3fw4 |
| — | nbdime (PyPI) | 3.0.0 to before 3.1.1 | 3.1.1 | Patch available | GHSA-p6rw-44q7-3fw4 |
| — | nbdime (npm) | before 5.0.2 | 5.0.2 | Patch available | GHSA-p6rw-44q7-3fw4 |
| — | nbdime (npm) | 6.0.0 to before 6.1.2 | 6.1.2 | Patch available | GHSA-p6rw-44q7-3fw4 |
| — | nbdime-jupyterlab (npm) | before 1.0.1 | 1.0.1 | Patch available | GHSA-p6rw-44q7-3fw4 |
| — | nbdime-jupyterlab (npm) | 2.0.0 to before 2.1.1 | 2.1.1 | Patch available | GHSA-p6rw-44q7-3fw4 |
- nbdime Vendorjupyterlab Affected < 1.1.1 - nbdime (pip); >= 2.0.0 , < 2.1.1 - nbdime (pip); >= 3.0.0, < 3.1.1 - nbdime (pip); < 5.0.2 - nbdime (npm); >= 6.0.0, < 6.1.2 - nbdime (npm); < 1.0.1 - nbdime-jupyterlab (npm); >= 2.0.0, < 2.1.1 - nbdime-jupyterlab (npm) Fixed in — No fix listed CNA
- nbdime (PyPI) Vendor— Affected before 1.1.1 Fixed in 1.1.1 Patch available GHSA-p6rw-44q7-3fw4
- nbdime (PyPI) Vendor— Affected 2.0.0 to before 2.1.1 Fixed in 2.1.1 Patch available GHSA-p6rw-44q7-3fw4
- nbdime (PyPI) Vendor— Affected 3.0.0 to before 3.1.1 Fixed in 3.1.1 Patch available GHSA-p6rw-44q7-3fw4
- nbdime (npm) Vendor— Affected before 5.0.2 Fixed in 5.0.2 Patch available GHSA-p6rw-44q7-3fw4
- nbdime (npm) Vendor— Affected 6.0.0 to before 6.1.2 Fixed in 6.1.2 Patch available GHSA-p6rw-44q7-3fw4
- nbdime-jupyterlab (npm) Vendor— Affected before 1.0.1 Fixed in 1.0.1 Patch available GHSA-p6rw-44q7-3fw4
- nbdime-jupyterlab (npm) Vendor— Affected 2.0.0 to before 2.1.1 Fixed in 2.1.1 Patch available GHSA-p6rw-44q7-3fw4
CPE configurations NVD · 3
| CPE | Versions | Role | Vendor |
|---|---|---|---|
| cpe:2.3:a:jupyter:nbdime:*:*:*:*:*:python:*:* | 1.0.0 to before 1.1.1; 2.0.0 to before 2.1.1; 3.0.0 – 3.1.1 | Vulnerable | jupyterlab |
| cpe:2.3:a:jupyter:nbdime:*:*:*:*:*:node.js:*:* | 5.0.0 to before 5.0.2; 6.0.0 to before 6.1.2 | Vulnerable | jupyterlab |
| cpe:2.3:a:jupyter:nbdime-jupyterlab:*:*:*:*:*:node.js:*:* | 1.0.0 to before 1.0.1; 2.0.0 to before 2.1.1 | Vulnerable | jupyterlab |
- cpe:2.3:a:jupyter:nbdime:*:*:*:*:*:python:*:* Versions 1.0.0 to before 1.1.1; 2.0.0 to before 2.1.1; 3.0.0 – 3.1.1 Vulnerable ·jupyterlab
- cpe:2.3:a:jupyter:nbdime:*:*:*:*:*:node.js:*:* Versions 5.0.0 to before 5.0.2; 6.0.0 to before 6.1.2 Vulnerable ·jupyterlab
- cpe:2.3:a:jupyter:nbdime-jupyterlab:*:*:*:*:*:node.js:*:* Versions 1.0.0 to before 1.0.1; 2.0.0 to before 2.1.1 Vulnerable ·jupyterlab
Remediation
- Fix · GHSA-p6rw-44q7-3fw4 nbdime (PyPI) Fixed in 1.1.1 Advisory →
- Fix · GHSA-p6rw-44q7-3fw4 nbdime (PyPI) Fixed in 2.1.1 Advisory →
- Fix · GHSA-p6rw-44q7-3fw4 nbdime (PyPI) Fixed in 3.1.1 Advisory →
- Fix · GHSA-p6rw-44q7-3fw4 nbdime (npm) Fixed in 5.0.2 Advisory →
- Fix · GHSA-p6rw-44q7-3fw4 nbdime (npm) Fixed in 6.1.2 Advisory →
- Fix · GHSA-p6rw-44q7-3fw4 nbdime-jupyterlab (npm) Fixed in 1.0.1 Advisory →
- Fix · GHSA-p6rw-44q7-3fw4 nbdime-jupyterlab (npm) Fixed in 2.1.1 Advisory →
Vendor assessments
Timeline
- 2026-10-02 Threatist record created from CVE-2021-41134
- 2026-10-03 Alias added: GHSA-p6rw-44q7-3fw4
References
Advisory 2
Sources
- CVE-2021-41134 · CVE Program
- CVE-2021-41134 · NVD
- FIRST EPSS
- GHSA-p6rw-44q7-3fw4 · GitHub Advisory Database · CC BY 4.0
- CVE-2021-41134 · Red Hat security data · CC BY 4.0
This product uses the NVD API but is not endorsed or certified by the NVD. Sources and licences