Skip to content
Heist/ feed
Back to feed
Medium

Security advisory

Type: advisorySources: OSVCVE: CVE-2021-41134

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.

Products
Not specified
Affected versions
Not specified
Fixed versions
Not specified
CVEs
CVE-2021-41134
Confirmed fixed CVEs
Not specified
Updated in this feed
31 Oct 2026, 11:20 UTC · Revision 1

Source evidence

CVE-2021-41134

core-osv · Original source

Published 3 Nov 2021, 18:15 UTC

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.

osv:CVE-2021-41134
Complete source record
{
  "id": "211ba20aa0c4f427f84643ce62a09545eed971756d6c785b332c2a6c8e6e2834",
  "url": "https://osv.dev/vulnerability/CVE-2021-41134",
  "method": "structured",
  "payload": {
    "kind": "advisory",
    "title": "CVE-2021-41134",
    "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.",
    "evidence": "osv:CVE-2021-41134",
    "products": [],
    "severity": "medium",
    "structured": {
      "id": "CVE-2021-41134",
      "aliases": [
        "CVE-2021-41134",
        "GHSA-p6rw-44q7-3fw4",
        "PYSEC-2021-428"
      ],
      "metrics": [
        {
          "type": "CVSS_V3",
          "score": "CVSS:3.1/AV:N/AC:L/PR:L/UI:R/S:C/C:L/I:L/A:N"
        }
      ],
      "affected": [
        {
          "ranges": [
            {
              "repo": "https://github.com/jupyter/nbdime",
              "type": "GIT",
              "events": [
                {
                  "introduced": "e689d717a62e4ca83ff5e236f31803806cbb7d70"
                },
                {
                  "fixed": "a79ab6d4b5d56941393fe40838ec40684415a9a7"
                },
                {
                  "fixed": "14c7c0af60fe4c87b3af820f4ba49736694185f5"
                },
                {
                  "introduced": "ccca87b62ac14978a0a715b04556df8391f38e2a"
                },
                {
                  "fixed": "d79cf100b5b4a16e7e0571a89e0d41b650e5453e"
                },
                {
                  "introduced": "35ec19839b0277631eb3b811e18e652e69e948c7"
                },
                {
                  "last_affected": "d79cf100b5b4a16e7e0571a89e0d41b650e5453e"
                },
                {
                  "introduced": "bd97d1c9d928d6d8c632d638e81d2a6fc095296e"
                },
                {
                  "fixed": "a79ab6d4b5d56941393fe40838ec40684415a9a7"
                },
                {
                  "introduced": "c61c9c17105a2ccf5393cb3c47cf505e542eb158"
                },
                {
                  "fixed": "d79cf100b5b4a16e7e0571a89e0d41b650e5453e"
                },
                {
                  "fixed": "e44a5cc7677f24b45ebafc756db49058c2f750ea"
                }
              ],
              "database_specific": {
                "extracted_events": [
                  {
                    "cpe": "cpe:2.3:a:jupyter:nbdime:*:*:*:*:*:python:*:*",
                    "range": [
                      {
                        "introduced": "1.0.0"
                      },
                      {
                        "fixed": "1.1.1"
                      }
                    ],
                    "source": "CPE_RANGE"
                  },
                  {
                    "cpe": "cpe:2.3:a:jupyter:nbdime-jupyterlab:*:*:*:*:*:node.js:*:*",
                    "range": [
                      {
                        "introduced": "1.0.0"
                      },
                      {
                        "fixed": "1.0.1"
                      }
                    ],
                    "source": "CPE_RANGE"
                  },
                  {
                    "cpe": "cpe:2.3:a:jupyter:nbdime:*:*:*:*:*:python:*:*",
                    "range": [
                      {
                        "introduced": "2.0.0"
                      },
                      {
                        "fixed": "2.1.1"
                      }
                    ],
                    "source": "CPE_RANGE"
                  },
                  {
                    "cpe": "cpe:2.3:a:jupyter:nbdime-jupyterlab:*:*:*:*:*:node.js:*:*",
                    "range": [
                      {
                        "introduced": "2.0.0"
                      },
                      {
                        "fixed": "2.1.1"
                      }
                    ],
                    "source": "CPE_RANGE"
                  },
                  {
                    "cpe": "cpe:2.3:a:jupyter:nbdime:*:*:*:*:*:python:*:*",
                    "range": [
                      {
                        "introduced": "3.0.0"
                      },
                      {
                        "last_affected": "3.1.1"
                      }
                    ],
                    "source": "CPE_RANGE"
                  },
                  {
                    "cpe": "cpe:2.3:a:jupyter:nbdime:*:*:*:*:*:node.js:*:*",
                    "range": [
                      {
                        "introduced": "5.0.0"
                      },
                      {
                        "fixed": "5.0.2"
                      }
                    ],
                    "source": "CPE_RANGE"
                  },
                  {
                    "cpe": "cpe:2.3:a:jupyter:nbdime:*:*:*:*:*:node.js:*:*",
                    "range": [
                      {
                        "introduced": "6.0.0"
                      },
                      {
                        "fixed": "6.1.2"
                      }
                    ],
                    "source": "CPE_RANGE"
                  },
                  {
                    "range": [
                      {
                        "fixed": "e44a5cc7677f24b45ebafc756db49058c2f750ea"
                      }
                    ],
                    "source": "REFERENCES_COMMIT"
                  }
                ]
              }
            }
          ],
          "versions": [
            "1.1.0",
            "2.1.0",
            "3.1.0",
            "nbdime@6.1.1",
            "nbdime@6.1.0",
            "nbdime-jupyterlab@2.1.0",
            "3.0.0",
            "nbdime@6.1.0-beta.1",
            "nbdime-jupyterlab@2.1.0-beta.1",
            "3.0.0b1",
            "nbdime-jupyterlab@2.0.1",
            "2.0.0",
            "nbdime-jupyterlab@2.0.0",
            "nbdime@6.0.0",
            "1.0.7",
            "nbdime@5.0.1",
            "nbdime-jupyterlab@1.0.0",
            "nbdime@5.0.0",
            "nbdime@1.0.0"
          ],
          "database_specific": {
            "source": "https://storage.googleapis.com/cve-osv-conversion/osv-output/CVE-2021-41134.json"
          }
        }
      ],
      "modified": "2026-10-20T10:53:56.922351707Z",
      "provider": "osv",
      "references": [
        "https://github.com/jupyter/nbdime/security/advisories/GHSA-p6rw-44q7-3fw4",
        "https://github.com/jupyter/nbdime/commit/e44a5cc7677f24b45ebafc756db49058c2f750ea"
      ],
      "provider_metadata": {}
    },
    "related_cves": [
      {
        "value": "CVE-2021-41134",
        "evidence": "/id"
      }
    ],
    "security_relevant": true,
    "severity_evidence": "/severity/0/score"
  },
  "source_id": "core-osv",
  "document_id": 384789,
  "published_at": "2021-11-03T18:15:08.35+00:00"
}