{"id":"CVE-2021-41134","aliases":["EUVD-2021-0140","GHSA-p6rw-44q7-3fw4","PYSEC-2021-428","openSUSE-SU-2024:11630-1"],"status":"published","title":"Stored XSS in Jupyter nbdime","description":"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":{"version":"3.1","score":8.7,"vector":"CVSS:3.1/AV:N/AC:L/PR:L/UI:R/S:C/C:H/I:H/A:N","level":"high","assessor":"cna","from":"cve"},"epss":{"day":"2026-11-11","score":0.00703,"percentile":0.53708,"model":"v2026.06.15"},"facts":{"in_kev":false,"known_exploited":false,"public_exploit":false,"fix_available":true},"cwes":["CWE-79"],"published":"2021-11-03T17:50:10Z","modified":"2026-10-20T10:53:56Z","fixes":[{"ecosystem":"PyPI","package":"nbdime","fixed_in":["1.1.1","2.1.1","3.1.1"],"sources":["ghsa","osv"]},{"ecosystem":"npm","package":"nbdime","fixed_in":["5.0.2","6.1.2"],"sources":["ghsa","osv"]},{"ecosystem":"npm","package":"nbdime-jupyterlab","fixed_in":["1.0.1","2.1.1"],"sources":["ghsa","osv"]}],"affected":[{"source":"ghsa","ecosystem":"PyPI","package":"nbdime","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"},{"fixed":"1.1.1"}]}]},{"source":"ghsa","ecosystem":"PyPI","package":"nbdime","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"2.0.0"},{"fixed":"2.1.1"}]}]},{"source":"ghsa","ecosystem":"PyPI","package":"nbdime","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"3.0.0"},{"fixed":"3.1.1"}]}]},{"source":"ghsa","ecosystem":"npm","package":"nbdime","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"},{"fixed":"5.0.2"}]}]},{"source":"ghsa","ecosystem":"npm","package":"nbdime","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"6.0.0"},{"fixed":"6.1.2"}]}]},{"source":"ghsa","ecosystem":"npm","package":"nbdime-jupyterlab","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"},{"fixed":"1.0.1"}]}]},{"source":"ghsa","ecosystem":"npm","package":"nbdime-jupyterlab","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"2.0.0"},{"fixed":"2.1.1"}]}]},{"source":"osv","ecosystem":"PyPI","package":"nbdime","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"},{"fixed":"1.1.1"}]}],"versions":["0.1.0","0.1.0.dev","0.1.0b1","0.1.1","0.1.2","0.2.0","0.3.0","0.4.0","0.4.1","1.0.0","1.0.0rc0","1.0.0rc1","1.0.1","1.0.2","1.0.3","1.0.4","1.0.5","1.0.6","1.0.7","1.1.0"]},{"source":"osv","ecosystem":"PyPI","package":"nbdime","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"2.0.0"},{"fixed":"2.1.1"}]}],"versions":["2.0.0","2.1.0"]},{"source":"osv","ecosystem":"PyPI","package":"nbdime","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"3.0.0"},{"fixed":"3.1.1"}]}],"versions":["3.0.0","3.1.0"]},{"source":"osv","ecosystem":"npm","package":"nbdime","ranges":[{"type":"SEMVER","events":[{"introduced":"0"},{"fixed":"5.0.2"}]}]},{"source":"osv","ecosystem":"npm","package":"nbdime","ranges":[{"type":"SEMVER","events":[{"introduced":"6.0.0"},{"fixed":"6.1.2"}]}]},{"source":"osv","ecosystem":"npm","package":"nbdime-jupyterlab","ranges":[{"type":"SEMVER","events":[{"introduced":"0"},{"fixed":"1.0.1"}]}]},{"source":"osv","ecosystem":"npm","package":"nbdime-jupyterlab","ranges":[{"type":"SEMVER","events":[{"introduced":"2.0.0"},{"fixed":"2.1.1"}]}]},{"source":"osv","ecosystem":"PyPI","package":"nbdime","ranges":[{"type":"GIT","events":[{"introduced":"0"},{"fixed":"e44a5cc7677f24b45ebafc756db49058c2f750ea"}]},{"type":"ECOSYSTEM","events":[{"introduced":"0"},{"fixed":"1.1.1"},{"introduced":"2.0.0"},{"fixed":"2.1.1"},{"introduced":"3.0.0"},{"fixed":"3.1.1"}]}],"versions":["0.1.0","0.1.0.dev","0.1.0b1","0.1.1","0.1.2","0.2.0","0.3.0","0.4.0","0.4.1","1.0.0","1.0.0rc0","1.0.0rc1","1.0.1","1.0.2","1.0.3","1.0.4","1.0.5","1.0.6","1.0.7","1.1.0","2.0.0","2.1.0","3.0.0","3.1.0"]}],"products":[{"vendor":"jupyter","product":"nbdime"},{"vendor":"jupyter","product":"nbdime-jupyterlab"}],"references":[{"url":"https://github.com/jupyter/nbdime/security/advisories/GHSA-p6rw-44q7-3fw4","tags":["x_refsource_CONFIRM","x_transferred","Third Party Advisory","advisory","web"]},{"url":"https://github.com/jupyter/nbdime/commit/e44a5cc7677f24b45ebafc756db49058c2f750ea","tags":["x_refsource_MISC","x_transferred","Patch","Third Party Advisory","fix","web"]},{"url":"https://nvd.nist.gov/vuln/detail/CVE-2021-41134","tags":["advisory"]},{"url":"https://github.com/pypa/advisory-database/tree/main/vulns/nbdime/PYSEC-2021-428.yaml","tags":["web"]},{"url":"https://github.com/advisories/GHSA-p6rw-44q7-3fw4"},{"url":"https://github.com/jupyter/nbdime","tags":["package"]},{"url":"","tags":["advisory"]},{"url":"https://www.suse.com/security/cve/CVE-2021-41134","tags":["web"]}],"sources":{"cve":[{"id":"CVE-2021-41134","title":"Stored XSS in Jupyter nbdime","description":"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.","status":"published","published":"2021-11-03T17:50:10Z","modified":"2024-08-04T02:59:31.698Z","cvss":[{"version":"3.1","score":8.7,"vector":"CVSS:3.1/AV:N/AC:L/PR:L/UI:R/S:C/C:H/I:H/A:N","level":"high","assessor":"cna"}],"cwes":["CWE-79"],"updated_at":"2026-11-02T14:32:59.105382Z"}],"euvd":[{"id":"EUVD-2021-0140","description":"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.","status":"published","published":"2021-11-03T17:50:10Z","modified":"2024-08-04T02:59:31Z","cvss":[{"version":"3.1","score":8.7,"vector":"CVSS:3.1/AV:N/AC:L/PR:L/UI:R/S:C/C:H/I:H/A:N","level":"high"}],"updated_at":"2026-11-03T03:24:19.242491Z"}],"ghsa":[{"id":"GHSA-p6rw-44q7-3fw4","title":"Stored XSS in Jupyter nbdime","description":"### Impact\n\nImproper handling of user controlled input caused a stored cross-site scripting (XSS) vulnerability. All previous versions of nbdime are affected.\n\n### Patches\n\nSecurity patches will be released for each of the major versions of the nbdime packages since version 1.x of the nbdime python package.\n\n#### Python\n- nbdime 1.x: Patched in v. 1.1.1\n- nbdime 2.x: Patched in v. 2.1.1\n- nbdime 3.x: Patched in v. 3.1.1\n\n#### npm\n- nbdime 6.x version: Patched in 6.1.2\n- nbdime 5.x version: Patched in 5.0.2\n- nbdime-jupyterlab 1.x version: Patched in 1.0.1\n- nbdime-jupyterlab 2.x version: Patched in 2.1.1\n\n### For more information\nIf you have any questions or comments about this advisory email us at [security@ipython.org](mailto:security@ipython.org).\n\n\n","status":"published","published":"2021-11-08T18:09:27Z","modified":"2024-10-01T19:31:58Z","cvss":[{"version":"4.0","score":6.3,"vector":"CVSS:4.0/AV:N/AC:L/AT:N/PR:L/UI:P/VC:N/VI:N/VA:N/SC:H/SI:H/SA:N","level":"medium"},{"version":"3.1","score":8.7,"vector":"CVSS:3.1/AV:N/AC:L/PR:L/UI:R/S:C/C:H/I:H/A:N","level":"high"}],"cwes":["CWE-79"],"updated_at":"2026-11-02T14:38:07.852618Z"}],"nvd":[{"id":"CVE-2021-41134","description":"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.","status":"published","published":"2021-11-03T18:15:08.35Z","modified":"2026-06-17T04:07:56.55Z","cvss":[{"version":"3.1","score":8.7,"vector":"CVSS:3.1/AV:N/AC:L/PR:L/UI:R/S:C/C:H/I:H/A:N","level":"high","assessor":"secondary"},{"version":"3.1","score":5.4,"vector":"CVSS:3.1/AV:N/AC:L/PR:L/UI:R/S:C/C:L/I:L/A:N","level":"medium","assessor":"primary"},{"version":"2.0","score":3.5,"vector":"AV:N/AC:M/Au:S/C:N/I:P/A:N","level":"low","assessor":"primary"}],"cwes":["CWE-79"],"updated_at":"2026-11-02T14:07:00.549994Z"}],"osv":[{"id":"CVE-2021-41134","description":"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.","status":"published","published":"2021-11-03T18:15:08.35Z","modified":"2026-10-20T10:53:56.922351707Z","cvss":[{"version":"3.1","score":5.4,"vector":"CVSS:3.1/AV:N/AC:L/PR:L/UI:R/S:C/C:L/I:L/A:N","level":"medium"}],"updated_at":"2026-11-02T15:44:21.249056Z"},{"id":"GHSA-p6rw-44q7-3fw4","title":"Stored XSS in Jupyter nbdime","description":"### Impact\n\nImproper handling of user controlled input caused a stored cross-site scripting (XSS) vulnerability. All previous versions of nbdime are affected.\n\n### Patches\n\nSecurity patches will be released for each of the major versions of the nbdime packages since version 1.x of the nbdime python package.\n\n#### Python\n- nbdime 1.x: Patched in v. 1.1.1\n- nbdime 2.x: Patched in v. 2.1.1\n- nbdime 3.x: Patched in v. 3.1.1\n\n#### npm\n- nbdime 6.x version: Patched in 6.1.2\n- nbdime 5.x version: Patched in 5.0.2\n- nbdime-jupyterlab 1.x version: Patched in 1.0.1\n- nbdime-jupyterlab 2.x version: Patched in 2.1.1\n\n### For more information\nIf you have any questions or comments about this advisory email us at [security@ipython.org](mailto:security@ipython.org).\n\n\n","status":"published","published":"2021-11-08T18:09:27Z","modified":"2026-07-08T06:27:23.429525263Z","cvss":[{"version":"3.1","score":8.7,"vector":"CVSS:3.1/AV:N/AC:L/PR:L/UI:R/S:C/C:H/I:H/A:N","level":"high"},{"version":"4.0","score":6.3,"vector":"CVSS:4.0/AV:N/AC:L/AT:N/PR:L/UI:P/VC:N/VI:N/VA:N/SC:H/SI:H/SA:N","level":"medium"}],"cwes":["CWE-79"],"updated_at":"2026-11-02T15:46:52.891208Z"},{"id":"openSUSE-SU-2024:11630-1","title":"jupyter-nbdime-6.1.2-8.1 on GA media","description":"These are all security issues fixed in the jupyter-nbdime-6.1.2-8.1 package on the GA media of openSUSE Tumbleweed.","status":"published","published":"2024-06-15T00:00:00Z","modified":"2026-02-04T02:16:37.363924Z","updated_at":"2026-11-02T16:58:35.195147Z"},{"id":"PYSEC-2021-428","description":"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.","status":"published","published":"2021-11-03T18:15:00Z","modified":"2023-11-08T04:06:52.41677Z","updated_at":"2026-11-02T15:52:53.119977Z"}]}}
