Skip to content
Heist/ feed
Back to feed
HighFix available

jupyter-notebook, node-sanitize-html — security advisory

Type: advisorySources: OSVAdvisory ID: UBUNTU-CVE-2022-25887

The package sanitize-html before 2.7.1 are vulnerable to Regular Expression Denial of Service (ReDoS) due to insecure global regular expression replacement logic of HTML comment removal.

Products
jupyter-notebook, node-sanitize-html
Affected versions
2.14.0+~2.13.0-1, 2.17.0+~2.16.1-1, 2.6.1-1, 2.8.0+~2.6.2-1, 6.2.0-1, 6.4.12-2.2, 6.4.12-2.2ubuntu1, 6.4.13-5, 6.4.13-5ubuntu0.1, 6.4.5-2, 6.4.5-3, 6.4.5-4, 6.4.8-1, 6.4.8-1ubuntu0.1
Fixed versions
6.4.12-2.2ubuntu1+esm1, 6.4.8-1ubuntu0.1+esm1
CVEs
CVE-2022-25887
Confirmed fixed CVEs
Not specified
Updated in this feed
31 Oct 2026, 00:45 UTC · Revision 1

Source evidence

UBUNTU-CVE-2022-25887

core-osv · Original source

Published 30 Aug 2022, 05:15 UTC

The package sanitize-html before 2.7.1 are vulnerable to Regular Expression Denial of Service (ReDoS) due to insecure global regular expression replacement logic of HTML comment removal.

osv:UBUNTU-CVE-2022-25887

node-sanitize-html

Fixed versions: Not specified

jupyter-notebook

Fixed versions: 6.4.8-1ubuntu0.1+esm1

node-sanitize-html

Fixed versions: Not specified

jupyter-notebook

Fixed versions: 6.4.12-2.2ubuntu1+esm1

jupyter-notebook

Fixed versions: Not specified

node-sanitize-html

Fixed versions: Not specified

jupyter-notebook

Fixed versions: Not specified

node-sanitize-html

Fixed versions: Not specified

jupyter-notebook

Fixed versions: Not specified

node-sanitize-html

Fixed versions: Not specified

Complete source record
{
  "id": "e747b0a7195a623be0aae740c1419de5a80d4a41b6ab3f5b7d4046a44c402a99",
  "url": "https://osv.dev/vulnerability/UBUNTU-CVE-2022-25887",
  "method": "structured",
  "payload": {
    "kind": "advisory",
    "title": "UBUNTU-CVE-2022-25887",
    "summary": "The package sanitize-html before 2.7.1 are vulnerable to Regular Expression Denial of Service (ReDoS) due to insecure global regular expression replacement logic of HTML comment removal.",
    "evidence": "osv:UBUNTU-CVE-2022-25887",
    "products": [
      {
        "name": {
          "value": "node-sanitize-html",
          "evidence": "/affected/0/package/name"
        },
        "prerequisites": [],
        "fixed_versions": [],
        "affected_versions": [
          {
            "value": "2.6.1-1",
            "evidence": "/affected/0/versions"
          }
        ]
      },
      {
        "name": {
          "value": "jupyter-notebook",
          "evidence": "/affected/1/package/name"
        },
        "prerequisites": [],
        "fixed_versions": [
          {
            "value": "6.4.8-1ubuntu0.1+esm1",
            "evidence": "/affected/1/ranges"
          }
        ],
        "affected_versions": [
          {
            "value": "6.2.0-1",
            "evidence": "/affected/1/versions"
          },
          {
            "value": "6.4.5-2",
            "evidence": "/affected/1/versions"
          },
          {
            "value": "6.4.5-3",
            "evidence": "/affected/1/versions"
          },
          {
            "value": "6.4.5-4",
            "evidence": "/affected/1/versions"
          },
          {
            "value": "6.4.8-1",
            "evidence": "/affected/1/versions"
          },
          {
            "value": "6.4.8-1ubuntu0.1",
            "evidence": "/affected/1/versions"
          }
        ]
      },
      {
        "name": {
          "value": "node-sanitize-html",
          "evidence": "/affected/2/package/name"
        },
        "prerequisites": [],
        "fixed_versions": [],
        "affected_versions": [
          {
            "value": "2.8.0+~2.6.2-1",
            "evidence": "/affected/2/versions"
          }
        ]
      },
      {
        "name": {
          "value": "jupyter-notebook",
          "evidence": "/affected/3/package/name"
        },
        "prerequisites": [],
        "fixed_versions": [
          {
            "value": "6.4.12-2.2ubuntu1+esm1",
            "evidence": "/affected/3/ranges"
          }
        ],
        "affected_versions": [
          {
            "value": "6.4.12-2.2",
            "evidence": "/affected/3/versions"
          },
          {
            "value": "6.4.12-2.2ubuntu1",
            "evidence": "/affected/3/versions"
          }
        ]
      },
      {
        "name": {
          "value": "jupyter-notebook",
          "evidence": "/affected/4/package/name"
        },
        "prerequisites": [],
        "fixed_versions": [],
        "affected_versions": [
          {
            "value": "6.4.13-5",
            "evidence": "/affected/4/versions"
          },
          {
            "value": "6.4.13-5ubuntu0.1",
            "evidence": "/affected/4/versions"
          }
        ]
      },
      {
        "name": {
          "value": "node-sanitize-html",
          "evidence": "/affected/5/package/name"
        },
        "prerequisites": [],
        "fixed_versions": [],
        "affected_versions": [
          {
            "value": "2.14.0+~2.13.0-1",
            "evidence": "/affected/5/versions"
          }
        ]
      },
      {
        "name": {
          "value": "jupyter-notebook",
          "evidence": "/affected/6/package/name"
        },
        "prerequisites": [],
        "fixed_versions": [],
        "affected_versions": [
          {
            "value": "6.4.13-5ubuntu0.1",
            "evidence": "/affected/6/versions"
          }
        ]
      },
      {
        "name": {
          "value": "node-sanitize-html",
          "evidence": "/affected/7/package/name"
        },
        "prerequisites": [],
        "fixed_versions": [],
        "affected_versions": [
          {
            "value": "2.14.0+~2.13.0-1",
            "evidence": "/affected/7/versions"
          },
          {
            "value": "2.17.0+~2.16.1-1",
            "evidence": "/affected/7/versions"
          }
        ]
      },
      {
        "name": {
          "value": "jupyter-notebook",
          "evidence": "/affected/8/package/name"
        },
        "prerequisites": [],
        "fixed_versions": [],
        "affected_versions": [
          {
            "value": "6.4.13-5ubuntu0.1",
            "evidence": "/affected/8/versions"
          }
        ]
      },
      {
        "name": {
          "value": "node-sanitize-html",
          "evidence": "/affected/9/package/name"
        },
        "prerequisites": [],
        "fixed_versions": [],
        "affected_versions": [
          {
            "value": "2.14.0+~2.13.0-1",
            "evidence": "/affected/9/versions"
          }
        ]
      }
    ],
    "severity": "high",
    "structured": {
      "id": "UBUNTU-CVE-2022-25887",
      "aliases": [
        "UBUNTU-CVE-2022-25887"
      ],
      "metrics": [
        {
          "type": "CVSS_V3",
          "score": "CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:L"
        },
        {
          "type": "CVSS_V3",
          "score": "CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H"
        },
        {
          "type": "Ubuntu",
          "score": "medium"
        }
      ],
      "affected": [
        {
          "ranges": [
            {
              "type": "ECOSYSTEM",
              "events": [
                {
                  "introduced": "0"
                }
              ]
            }
          ],
          "package": {
            "name": "node-sanitize-html",
            "purl": "pkg:deb/ubuntu/node-sanitize-html?arch=source&distro=jammy",
            "ecosystem": "Ubuntu:22.04:LTS"
          },
          "versions": [
            "2.6.1-1"
          ],
          "database_specific": {
            "source": "https://github.com/canonical/ubuntu-security-notices/blob/main/osv/cve/2022/UBUNTU-CVE-2022-25887.json"
          },
          "ecosystem_specific": {
            "binaries": [
              {
                "binary_name": "node-sanitize-html",
                "binary_version": "2.6.1-1"
              }
            ]
          }
        },
        {
          "ranges": [
            {
              "type": "ECOSYSTEM",
              "events": [
                {
                  "introduced": "0"
                },
                {
                  "fixed": "6.4.8-1ubuntu0.1+esm1"
                }
              ]
            }
          ],
          "package": {
            "name": "jupyter-notebook",
            "purl": "pkg:deb/ubuntu/jupyter-notebook?arch=source&distro=esm-apps%2Fjammy",
            "ecosystem": "Ubuntu:Pro:22.04:LTS"
          },
          "versions": [
            "6.2.0-1",
            "6.4.5-2",
            "6.4.5-3",
            "6.4.5-4",
            "6.4.8-1",
            "6.4.8-1ubuntu0.1"
          ],
          "database_specific": {
            "source": "https://github.com/canonical/ubuntu-security-notices/blob/main/osv/cve/2022/UBUNTU-CVE-2022-25887.json"
          },
          "ecosystem_specific": {
            "binaries": [
              {
                "binary_name": "jupyter-notebook",
                "binary_version": "6.4.8-1ubuntu0.1+esm1"
              },
              {
                "binary_name": "python3-notebook",
                "binary_version": "6.4.8-1ubuntu0.1+esm1"
              }
            ],
            "availability": "Available with Ubuntu Pro: https://ubuntu.com/pro"
          }
        },
        {
          "ranges": [
            {
              "type": "ECOSYSTEM",
              "events": [
                {
                  "introduced": "0"
                }
              ]
            }
          ],
          "package": {
            "name": "node-sanitize-html",
            "purl": "pkg:deb/ubuntu/node-sanitize-html?arch=source&distro=noble",
            "ecosystem": "Ubuntu:24.04:LTS"
          },
          "versions": [
            "2.8.0+~2.6.2-1"
          ],
          "database_specific": {
            "source": "https://github.com/canonical/ubuntu-security-notices/blob/main/osv/cve/2022/UBUNTU-CVE-2022-25887.json"
          },
          "ecosystem_specific": {
            "binaries": [
              {
                "binary_name": "node-sanitize-html",
                "binary_version": "2.8.0+~2.6.2-1"
              }
            ]
          }
        },
        {
          "ranges": [
            {
              "type": "ECOSYSTEM",
              "events": [
                {
                  "introduced": "0"
                },
                {
                  "fixed": "6.4.12-2.2ubuntu1+esm1"
                }
              ]
            }
          ],
          "package": {
            "name": "jupyter-notebook",
            "purl": "pkg:deb/ubuntu/jupyter-notebook?arch=source&distro=esm-apps%2Fnoble",
            "ecosystem": "Ubuntu:Pro:24.04:LTS"
          },
          "versions": [
            "6.4.12-2.2",
            "6.4.12-2.2ubuntu1"
          ],
          "database_specific": {
            "source": "https://github.com/canonical/ubuntu-security-notices/blob/main/osv/cve/2022/UBUNTU-CVE-2022-25887.json"
          },
          "ecosystem_specific": {
            "binaries": [
              {
                "binary_name": "jupyter-notebook",
                "binary_version": "6.4.12-2.2ubuntu1+esm1"
              },
              {
                "binary_name": "python3-notebook",
                "binary_version": "6.4.12-2.2ubuntu1+esm1"
              }
            ],
            "availability": "Available with Ubuntu Pro: https://ubuntu.com/pro"
          }
        },
        {
          "ranges": [
            {
              "type": "ECOSYSTEM",
              "events": [
                {
                  "introduced": "0"
                }
              ]
            }
          ],
          "package": {
            "name": "jupyter-notebook",
            "purl": "pkg:deb/ubuntu/jupyter-notebook?arch=source&distro=questing",
            "ecosystem": "Ubuntu:25.10"
          },
          "versions": [
            "6.4.13-5",
            "6.4.13-5ubuntu0.1"
          ],
          "database_specific": {
            "source": "https://github.com/canonical/ubuntu-security-notices/blob/main/osv/cve/2022/UBUNTU-CVE-2022-25887.json"
          },
          "ecosystem_specific": {
            "binaries": [
              {
                "binary_name": "jupyter-notebook",
                "binary_version": "6.4.13-5ubuntu0.1"
              },
              {
                "binary_name": "python3-notebook",
                "binary_version": "6.4.13-5ubuntu0.1"
              }
            ]
          }
        },
        {
          "ranges": [
            {
              "type": "ECOSYSTEM",
              "events": [
                {
                  "introduced": "0"
                }
              ]
            }
          ],
          "package": {
            "name": "node-sanitize-html",
            "purl": "pkg:deb/ubuntu/node-sanitize-html?arch=source&distro=questing",
            "ecosystem": "Ubuntu:25.10"
          },
          "versions": [
            "2.14.0+~2.13.0-1"
          ],
          "database_specific": {
            "source": "https://github.com/canonical/ubuntu-security-notices/blob/main/osv/cve/2022/UBUNTU-CVE-2022-25887.json"
          },
          "ecosystem_specific": {
            "binaries": [
              {
                "binary_name": "node-sanitize-html",
                "binary_version": "2.14.0+~2.13.0-1"
              }
            ]
          }
        },
        {
          "ranges": [
            {
              "type": "ECOSYSTEM",
              "events": [
                {
                  "introduced": "0"
                }
              ]
            }
          ],
          "package": {
            "name": "jupyter-notebook",
            "purl": "pkg:deb/ubuntu/jupyter-notebook?arch=source&distro=stonking",
            "ecosystem": "Ubuntu:26.10"
          },
          "versions": [
            "6.4.13-5ubuntu0.1"
          ],
          "database_specific": {
            "source": "https://github.com/canonical/ubuntu-security-notices/blob/main/osv/cve/2022/UBUNTU-CVE-2022-25887.json"
          },
          "ecosystem_specific": {
            "binaries": [
              {
                "binary_name": "jupyter-notebook",
                "binary_version": "6.4.13-5ubuntu0.1"
              },
              {
                "binary_name": "python3-notebook",
                "binary_version": "6.4.13-5ubuntu0.1"
              }
            ]
          }
        },
        {
          "ranges": [
            {
              "type": "ECOSYSTEM",
              "events": [
                {
                  "introduced": "0"
                }
              ]
            }
          ],
          "package": {
            "name": "node-sanitize-html",
            "purl": "pkg:deb/ubuntu/node-sanitize-html?arch=source&distro=stonking",
            "ecosystem": "Ubuntu:26.10"
          },
          "versions": [
            "2.14.0+~2.13.0-1",
            "2.17.0+~2.16.1-1"
          ],
          "database_specific": {
            "source": "https://github.com/canonical/ubuntu-security-notices/blob/main/osv/cve/2022/UBUNTU-CVE-2022-25887.json"
          },
          "ecosystem_specific": {
            "binaries": [
              {
                "binary_name": "node-sanitize-html",
                "binary_version": "2.17.0+~2.16.1-1"
              }
            ]
          }
        },
        {
          "ranges": [
            {
              "type": "ECOSYSTEM",
              "events": [
                {
                  "introduced": "0"
                }
              ]
            }
          ],
          "package": {
            "name": "jupyter-notebook",
            "purl": "pkg:deb/ubuntu/jupyter-notebook?arch=source&distro=resolute",
            "ecosystem": "Ubuntu:26.04:LTS"
          },
          "versions": [
            "6.4.13-5ubuntu0.1"
          ],
          "database_specific": {
            "source": "https://github.com/canonical/ubuntu-security-notices/blob/main/osv/cve/2022/UBUNTU-CVE-2022-25887.json"
          },
          "ecosystem_specific": {
            "binaries": [
              {
                "binary_name": "jupyter-notebook",
                "binary_version": "6.4.13-5ubuntu0.1"
              },
              {
                "binary_name": "python3-notebook",
                "binary_version": "6.4.13-5ubuntu0.1"
              }
            ]
          }
        },
        {
          "ranges": [
            {
              "type": "ECOSYSTEM",
              "events": [
                {
                  "introduced": "0"
                }
              ]
            }
          ],
          "package": {
            "name": "node-sanitize-html",
            "purl": "pkg:deb/ubuntu/node-sanitize-html?arch=source&distro=resolute",
            "ecosystem": "Ubuntu:26.04:LTS"
          },
          "versions": [
            "2.14.0+~2.13.0-1"
          ],
          "database_specific": {
            "source": "https://github.com/canonical/ubuntu-security-notices/blob/main/osv/cve/2022/UBUNTU-CVE-2022-25887.json"
          },
          "ecosystem_specific": {
            "binaries": [
              {
                "binary_name": "node-sanitize-html",
                "binary_version": "2.14.0+~2.13.0-1"
              }
            ]
          }
        }
      ],
      "modified": "2026-10-17T12:56:02.355065337Z",
      "provider": "osv",
      "upstream": [
        "CVE-2022-25887"
      ],
      "references": [
        "https://ubuntu.com/security/CVE-2022-25887",
        "https://security.snyk.io/vuln/SNYK-JS-SANITIZEHTML-2957526",
        "https://security.snyk.io/vuln/SNYK-JAVA-ORGWEBJARSNPM-3008102",
        "https://github.com/apostrophecms/sanitize-html/pull/557",
        "https://github.com/apostrophecms/sanitize-html/commit/b4682c12fd30e12e82fa2d9b766de91d7d2cd23c",
        "https://www.cve.org/CVERecord?id=CVE-2022-25887",
        "https://ubuntu.com/security/notices/USN-7464-1"
      ]
    },
    "related_cves": [
      {
        "value": "CVE-2022-25887",
        "evidence": "/upstream"
      }
    ],
    "security_relevant": true,
    "severity_evidence": "/severity/1/score"
  },
  "source_id": "core-osv",
  "document_id": 354648,
  "published_at": "2022-08-30T05:15:00+00:00"
}