{"id":"CVE-2021-41134","published":"2021-11-03T17:50:10Z","modified":"2024-08-04T02:59:31Z","title":"Stored XSS in Jupyter nbdime","vendor":"jupyter","product":"nbdime","tier":"tail","description":{"text":"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.","provenance":"source","from":"CVE.org"},"cvss":{"score":8.7,"severity":"HIGH","version":"3.1","vector":"CVSS:3.1/AV:N/AC:L/PR:L/UI:R/S:C/C:H/I:H/A:N","provenance":"source","from":"CVE.org CNA"},"epss":{"score":0.00703,"percentile":0.48832,"provenance":"source"},"cwes":[{"id":"CWE-79","name":"Improper Neutralization of Input During Web Page Generation"}],"references":[{"url":"https://github.com/jupyter/nbdime/security/advisories/GHSA-p6rw-44q7-3fw4","tags":["x_refsource_CONFIRM"]},{"url":"https://github.com/jupyter/nbdime/commit/e44a5cc7677f24b45ebafc756db49058c2f750ea","tags":["x_refsource_MISC"]}],"priority":{"score":15.9,"factors":[{"name":"EPSS percentile","points":9.77},{"name":"CVSS severity","points":6.09}]},"vendorSlug":"jupyter","affectedVersions":[{"vendor":"jupyter","product":"nbdime","versions":["< 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)"]}],"affected":[{"ecosystem":"PyPI","package":"nbdime","vulnerableRanges":["<1.1.1",">=2.0.0, <2.1.1",">=3.0.0, <3.1.1"],"patched":["1.1.1","2.1.1","3.1.1"],"from":["GHSA-p6rw-44q7-3fw4","PYSEC-2021-428"],"provenance":"source"},{"ecosystem":"npm","package":"nbdime","vulnerableRanges":["<5.0.2",">=6.0.0, <6.1.2"],"patched":["5.0.2","6.1.2"],"from":["GHSA-p6rw-44q7-3fw4"],"provenance":"source"},{"ecosystem":"npm","package":"nbdime-jupyterlab","vulnerableRanges":["<1.0.1",">=2.0.0, <2.1.1"],"patched":["1.0.1","2.1.1"],"from":["GHSA-p6rw-44q7-3fw4"],"provenance":"source"}],"summary":{"text":"The stored cross-site scripting flaw lives in the diffNotebookCheckpoint function of the nbdime project, which provides diffing and merging tools for Jupyter Notebooks. Because the notebook file name and path read from disk are not sanitized before being returned for display, and the frontend renders them as HTML, an attacker with low privileges who can get a user to interact with a crafted notebook name can run script in the victim's context and affect confidentiality and integrity of that session.","provenance":"ai","model":"claude-haiku-5-5","generatedAt":"2026-11-20T20:47:37Z"},"euvd":{"id":"EUVD-2021-0140","exploited":false,"provenance":"source"}}