{"schemaVersion":3,"id":"CVE-2021-41134","aliases":["GHSA-p6rw-44q7-3fw4","PYSEC-2021-428"],"status":"published","duplicateOf":null,"title":null,"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.","dates":{"published":"2021-11-03T17:50:10.000Z","modified":"2024-08-04T02:59:31.698Z","reserved":null,"kevAdded":[],"kevDue":[]},"cvss":{"headline":{"score":8.7,"severity":"high","version":"3.1","versionLabel":"v3.1","source":"CVE.org","vector":"CVSS:3.1/AV:N/AC:L/PR:L/UI:R/S:C/C:H/I:H/A:N","computed":false,"selection":"backend-summary"},"metrics":[{"version":"3.1","versionLabel":"v3.1","source":"CVE.org","score":8.7,"severity":"high","vector":"CVSS:3.1/AV:N/AC:L/PR:L/UI:R/S:C/C:H/I:H/A:N","exploitability":null,"impact":null,"computed":false},{"version":"4.0","versionLabel":"v4.0","source":"OSV · Pypi","score":6.3,"severity":"medium","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","exploitability":null,"impact":null,"computed":true},{"version":"3.1","versionLabel":"v3.1","source":"OSV · Pypi","score":8.7,"severity":"high","vector":"CVSS:3.1/AV:N/AC:L/PR:L/UI:R/S:C/C:H/I:H/A:N","exploitability":5.9,"impact":9.7,"computed":true},{"version":"4.0","versionLabel":"v4.0","source":"OSV · Npm","score":6.3,"severity":"medium","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","exploitability":null,"impact":null,"computed":true},{"version":"3.1","versionLabel":"v3.1","source":"OSV · Npm","score":8.7,"severity":"high","vector":"CVSS:3.1/AV:N/AC:L/PR:L/UI:R/S:C/C:H/I:H/A:N","exploitability":5.9,"impact":9.7,"computed":true},{"version":"3.1","versionLabel":"v3.1","source":"NVD","score":5.4,"severity":"medium","vector":"CVSS:3.1/AV:N/AC:L/PR:L/UI:R/S:C/C:L/I:L/A:N","exploitability":null,"impact":null,"computed":false},{"version":"2.0","versionLabel":"v2.0","source":"NVD","score":3.5,"severity":"low","vector":"AV:N/AC:M/Au:S/C:N/I:P/A:N","exploitability":null,"impact":null,"computed":false}]},"epss":{"probability":0.00703,"percentile":0.52461,"severity":"low","asOf":"2026-10-20T00:00:00.000Z","change":{"pp":0,"baselineDate":"2026-09-20T00:00:00.000Z","baselineScore":0.00703},"history":[{"date":"2026-09-14T00:00:00.000Z","score":0.00703,"percentile":null},{"date":"2026-09-15T00:00:00.000Z","score":0.00703,"percentile":null},{"date":"2026-09-16T00:00:00.000Z","score":0.00703,"percentile":null},{"date":"2026-09-17T00:00:00.000Z","score":0.00703,"percentile":null},{"date":"2026-09-18T00:00:00.000Z","score":0.00703,"percentile":null},{"date":"2026-09-19T00:00:00.000Z","score":0.00703,"percentile":null},{"date":"2026-09-20T00:00:00.000Z","score":0.00703,"percentile":null},{"date":"2026-09-21T00:00:00.000Z","score":0.00703,"percentile":null},{"date":"2026-09-22T00:00:00.000Z","score":0.00703,"percentile":null},{"date":"2026-09-23T00:00:00.000Z","score":0.00703,"percentile":null},{"date":"2026-09-24T00:00:00.000Z","score":0.00703,"percentile":null},{"date":"2026-09-25T00:00:00.000Z","score":0.00703,"percentile":null},{"date":"2026-09-26T00:00:00.000Z","score":0.00703,"percentile":null},{"date":"2026-09-27T00:00:00.000Z","score":0.00703,"percentile":null},{"date":"2026-09-28T00:00:00.000Z","score":0.00703,"percentile":null},{"date":"2026-09-29T00:00:00.000Z","score":0.00703,"percentile":null},{"date":"2026-09-30T00:00:00.000Z","score":0.00703,"percentile":null},{"date":"2026-10-01T00:00:00.000Z","score":0.00703,"percentile":null},{"date":"2026-10-02T00:00:00.000Z","score":0.00703,"percentile":null},{"date":"2026-10-03T00:00:00.000Z","score":0.00703,"percentile":null},{"date":"2026-10-04T00:00:00.000Z","score":0.00703,"percentile":null},{"date":"2026-10-05T00:00:00.000Z","score":0.00703,"percentile":null},{"date":"2026-10-06T00:00:00.000Z","score":0.00703,"percentile":null},{"date":"2026-10-07T00:00:00.000Z","score":0.00703,"percentile":null},{"date":"2026-10-08T00:00:00.000Z","score":0.00703,"percentile":null},{"date":"2026-10-09T00:00:00.000Z","score":0.00703,"percentile":null},{"date":"2026-10-10T00:00:00.000Z","score":0.00703,"percentile":null},{"date":"2026-10-11T00:00:00.000Z","score":0.00703,"percentile":null},{"date":"2026-10-12T00:00:00.000Z","score":0.00703,"percentile":null},{"date":"2026-10-13T00:00:00.000Z","score":0.00703,"percentile":null},{"date":"2026-10-14T00:00:00.000Z","score":0.00703,"percentile":null},{"date":"2026-10-15T00:00:00.000Z","score":0.00703,"percentile":null},{"date":"2026-10-16T00:00:00.000Z","score":0.00703,"percentile":null},{"date":"2026-10-17T00:00:00.000Z","score":0.00703,"percentile":null},{"date":"2026-10-18T00:00:00.000Z","score":0.00703,"percentile":null},{"date":"2026-10-19T00:00:00.000Z","score":0.00703,"percentile":null},{"date":"2026-10-20T00:00:00.000Z","score":0.00703,"percentile":0.52461}],"last30":[{"date":"2026-09-20T00:00:00.000Z","score":0.00703,"percentile":null},{"date":"2026-09-21T00:00:00.000Z","score":0.00703,"percentile":null},{"date":"2026-09-22T00:00:00.000Z","score":0.00703,"percentile":null},{"date":"2026-09-23T00:00:00.000Z","score":0.00703,"percentile":null},{"date":"2026-09-24T00:00:00.000Z","score":0.00703,"percentile":null},{"date":"2026-09-25T00:00:00.000Z","score":0.00703,"percentile":null},{"date":"2026-09-26T00:00:00.000Z","score":0.00703,"percentile":null},{"date":"2026-09-27T00:00:00.000Z","score":0.00703,"percentile":null},{"date":"2026-09-28T00:00:00.000Z","score":0.00703,"percentile":null},{"date":"2026-09-29T00:00:00.000Z","score":0.00703,"percentile":null},{"date":"2026-09-30T00:00:00.000Z","score":0.00703,"percentile":null},{"date":"2026-10-01T00:00:00.000Z","score":0.00703,"percentile":null},{"date":"2026-10-02T00:00:00.000Z","score":0.00703,"percentile":null},{"date":"2026-10-03T00:00:00.000Z","score":0.00703,"percentile":null},{"date":"2026-10-04T00:00:00.000Z","score":0.00703,"percentile":null},{"date":"2026-10-05T00:00:00.000Z","score":0.00703,"percentile":null},{"date":"2026-10-06T00:00:00.000Z","score":0.00703,"percentile":null},{"date":"2026-10-07T00:00:00.000Z","score":0.00703,"percentile":null},{"date":"2026-10-08T00:00:00.000Z","score":0.00703,"percentile":null},{"date":"2026-10-09T00:00:00.000Z","score":0.00703,"percentile":null},{"date":"2026-10-10T00:00:00.000Z","score":0.00703,"percentile":null},{"date":"2026-10-11T00:00:00.000Z","score":0.00703,"percentile":null},{"date":"2026-10-12T00:00:00.000Z","score":0.00703,"percentile":null},{"date":"2026-10-13T00:00:00.000Z","score":0.00703,"percentile":null},{"date":"2026-10-14T00:00:00.000Z","score":0.00703,"percentile":null},{"date":"2026-10-15T00:00:00.000Z","score":0.00703,"percentile":null},{"date":"2026-10-16T00:00:00.000Z","score":0.00703,"percentile":null},{"date":"2026-10-17T00:00:00.000Z","score":0.00703,"percentile":null},{"date":"2026-10-18T00:00:00.000Z","score":0.00703,"percentile":null},{"date":"2026-10-19T00:00:00.000Z","score":0.00703,"percentile":null},{"date":"2026-10-20T00:00:00.000Z","score":0.00703,"percentile":0.52461}]},"kev":{"state":"not-listed","entries":[],"listedCount":0,"totalCatalogs":3,"catalogs":[{"source":"cisa","label":"CISA","listed":false,"entry":null},{"source":"enisa","label":"ENISA","listed":false,"entry":null},{"source":"circl","label":"CIRCL","listed":false,"entry":null}]},"ransomware":{"state":"none-recorded","sources":[]},"exploits":[],"exploitCount":0,"weaknesses":[{"id":"CWE-79","name":"Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting')","description":"The product does not neutralize or incorrectly neutralizes user-controllable input before it is placed in output that is used as a web page that is served to other users.","type":"weakness","status":"Stable","abstraction":"Base","likelihoodOfExploit":"High","url":"https://cwe.mitre.org/data/definitions/79.html"}],"affected":[{"vendor":"jupyter","product":"nbdime","name":"nbdime","label":"nbdime","ecosystem":null,"cpePart":"a","purl":null,"purlType":null,"versions":[{"text":"< 1.1.1 - nbdime (pip)","noFixRecorded":false,"fixedIn":null},{"text":"≥ 2.0.0 , < 2.1.1 - nbdime (pip)","noFixRecorded":true,"fixedIn":null},{"text":"≥ 3.0.0, < 3.1.1 - nbdime (pip)","noFixRecorded":true,"fixedIn":null},{"text":"< 5.0.2 - nbdime (npm)","noFixRecorded":false,"fixedIn":null},{"text":"≥ 6.0.0, < 6.1.2 - nbdime (npm)","noFixRecorded":true,"fixedIn":null},{"text":"< 1.0.1 - nbdime-jupyterlab (npm)","noFixRecorded":false,"fixedIn":null},{"text":"≥ 2.0.0, < 2.1.1 - nbdime-jupyterlab (npm)","noFixRecorded":true,"fixedIn":null},{"text":"≥ 1.0.0, < 1.1.1","noFixRecorded":false,"fixedIn":null},{"text":"≥ 2.0.0, < 2.1.1","noFixRecorded":false,"fixedIn":null},{"text":"≥ 3.0.0, ≤ 3.1.1","noFixRecorded":false,"fixedIn":null},{"text":"≥ 5.0.0, < 5.0.2","noFixRecorded":false,"fixedIn":null},{"text":"≥ 6.0.0, < 6.1.2","noFixRecorded":false,"fixedIn":null}],"versionsText":"< 1.1.1 - nbdime (pip) | ≥ 2.0.0 , < 2.1.1 - nbdime (pip) (No fix recorded) | ≥ 3.0.0, < 3.1.1 - nbdime (pip) (No fix recorded) | < 5.0.2 - nbdime (npm) | ≥ 6.0.0, < 6.1.2 - nbdime (npm) (No fix recorded) | < 1.0.1 - nbdime-jupyterlab (npm) | ≥ 2.0.0, < 2.1.1 - nbdime-jupyterlab (npm) (No fix recorded) | ≥ 1.0.0, < 1.1.1 | ≥ 2.0.0, < 2.1.1 | ≥ 3.0.0, ≤ 3.1.1 | ≥ 5.0.0, < 5.0.2 | ≥ 6.0.0, < 6.1.2","eol":null,"hubHref":"/vendor/jupyter/nbdime"},{"vendor":"jupyter","product":"nbdime-jupyterlab","name":"nbdime-jupyterlab","label":"nbdime-jupyterlab","ecosystem":null,"cpePart":"a","purl":null,"purlType":null,"versions":[{"text":"≥ 1.0.0, < 1.0.1","noFixRecorded":false,"fixedIn":null},{"text":"≥ 2.0.0, < 2.1.1","noFixRecorded":false,"fixedIn":null}],"versionsText":"≥ 1.0.0, < 1.0.1 | ≥ 2.0.0, < 2.1.1","eol":null,"hubHref":"/vendor/jupyter/nbdime-jupyterlab"},{"vendor":"Npm","product":"nbdime","name":"nbdime","label":"nbdime","ecosystem":"Npm","cpePart":null,"purl":"pkg:npm/nbdime","purlType":"npm","versions":[{"text":"< 5.0.2","noFixRecorded":false,"fixedIn":null},{"text":"≥ 6.0.0, < 6.1.2","noFixRecorded":false,"fixedIn":null}],"versionsText":"< 5.0.2 | ≥ 6.0.0, < 6.1.2","eol":null,"hubHref":null},{"vendor":"Npm","product":"nbdime-jupyterlab","name":"nbdime-jupyterlab","label":"nbdime-jupyterlab","ecosystem":"Npm","cpePart":null,"purl":"pkg:npm/nbdime-jupyterlab","purlType":"npm","versions":[{"text":"< 1.0.1","noFixRecorded":false,"fixedIn":null},{"text":"≥ 2.0.0, < 2.1.1","noFixRecorded":false,"fixedIn":null}],"versionsText":"< 1.0.1 | ≥ 2.0.0, < 2.1.1","eol":null,"hubHref":null},{"vendor":"PyPI","product":"nbdime","name":"nbdime","label":"nbdime","ecosystem":"PyPI","cpePart":null,"purl":"pkg:pypi/nbdime","purlType":"pypi","versions":[{"text":"< 1.1.1","noFixRecorded":false,"fixedIn":null},{"text":"≥ 2.0.0, < 2.1.1","noFixRecorded":false,"fixedIn":null},{"text":"≥ 3.0.0, < 3.1.1","noFixRecorded":false,"fixedIn":null},{"text":"< e44a5cc7677f24b45ebafc756db49058c2f750ea","noFixRecorded":false,"fixedIn":null}],"versionsText":"< 1.1.1 | ≥ 2.0.0, < 2.1.1 | ≥ 3.0.0, < 3.1.1 | < e44a5cc7677f24b45ebafc756db49058c2f750ea","eol":null,"hubHref":null}],"affectedCount":5,"eol":{"hasEol":false,"count":0},"references":[{"url":"https://github.com/jupyter/nbdime/security/advisories/GHSA-p6rw-44q7-3fw4","label":"github.com/jupyter/nbdime/security/advisories/GHSA-p6rw-44q7-3fw4","hostname":"github.com","tags":["X Refsource CONFIRM","WEB","Advisory","Third Party Advisory"]},{"url":"https://github.com/jupyter/nbdime/commit/e44a5cc7677f24b45ebafc756db49058c2f750ea","label":"github.com/jupyter/nbdime/commit/e44a5cc7677f24b45ebafc756db49058c2f750ea","hostname":"github.com","tags":["X Refsource MISC","WEB","FIX","Patch","Third Party Advisory"]},{"url":"https://nvd.nist.gov/vuln/detail/CVE-2021-41134","label":"nvd.nist.gov/vuln/detail/CVE-2021-41134","hostname":"nvd.nist.gov","tags":["Advisory"]},{"url":"https://github.com/jupyter/nbdime","label":"github.com/jupyter/nbdime","hostname":"github.com","tags":["PACKAGE"]},{"url":"https://github.com/pypa/advisory-database/tree/main/vulns/nbdime/PYSEC-2021-428.yaml","label":"github.com/pypa/advisory-database/tree/main/vulns/nbdime/PYSEC-2021-428.yaml","hostname":"github.com","tags":["WEB"]}],"lineage":{"upstream":[],"downstream":[],"duplicates":[],"related":[]},"timeline":[{"kind":"published","date":"2021-11-03T17:50:10.000Z","label":"Published","detail":"Vulnerability first disclosed.","source":null},{"kind":"modified","date":"2024-08-04T02:59:31.698Z","label":"Last modified","detail":"Vulnerability information updated.","source":null}],"risk":{"score":35,"level":"medium","profile":"Default","thresholds":{"critical":75,"high":50,"medium":25,"low":10}},"meta":{"dataAsOf":"2026-10-21T03:25:13.795Z","stale":false,"partial":false}}