CVE catalog

CVE-2021-26540

node-sanitize-html affected and fixed versions

[CVE catalog]

Apostrophe Technologies sanitize-html before 2.3.2 does not properly validate the hostnames set by the "allowedIframeHostnames" option when the "allowIframeRelativeUrls" is set to true, which allows attackers to bypass hostname whitelist for iframe element, related using an src value that starts with "/\\example.com".

Severity
Medium · CVSS 5.3CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:L/A:N
Published
Source
[NVD] · [CVE record]
EPSS
1.75% · Oct 27, 2026

Projects and upstream resources

Reported versions and fixes

Each observation applies to its named package, distribution, and release. Distribution backports can fix a vulnerability while retaining an older upstream version number.

Distribution / releasePackageVersionStatusSource
Debiantrixienode-sanitize-htmlNot reportedNot affectedDistribution reports not affected[CVE-2021-26540]
Debiantrixienode-sanitize-html2.14.0+~2.13.0-1Not affected[CVE-2021-26540]
Debiansidnode-sanitize-htmlNot reportedNot affectedDistribution reports not affected[CVE-2021-26540]
Debiansidnode-sanitize-html2.17.0+~2.16.1-1Not affected[CVE-2021-26540]
Debianforkynode-sanitize-htmlNot reportedNot affectedDistribution reports not affected[CVE-2021-26540]
Debianforkynode-sanitize-html2.17.0+~2.16.1-1Not affected[CVE-2021-26540]
Debianbookwormnode-sanitize-htmlNot reportedNot affectedDistribution reports not affected[CVE-2021-26540]
Debianbookwormnode-sanitize-html2.8.0+~2.6.2-1Not affected[CVE-2021-26540]
Provider details and historical evidence
Distribution / releasePackageVersionStatusSource
Debianbookwormnode-sanitize-htmlNot reportedNot affectedDistribution reports not affected[CVE-2021-26540]
Debianbookwormnode-sanitize-html2.8.0+~2.6.2-1Not affected[CVE-2021-26540]
Debianforkynode-sanitize-htmlNot reportedNot affectedDistribution reports not affected[CVE-2021-26540]
Debianforkynode-sanitize-html2.17.0+~2.16.1-1Not affected[CVE-2021-26540]
Debiansidnode-sanitize-htmlNot reportedNot affectedDistribution reports not affected[CVE-2021-26540]
Debiansidnode-sanitize-html2.17.0+~2.16.1-1Not affected[CVE-2021-26540]
Debiantrixienode-sanitize-htmlNot reportedNot affectedDistribution reports not affected[CVE-2021-26540]
Debiantrixienode-sanitize-html2.14.0+~2.13.0-1Not affected[CVE-2021-26540]
Original provider fields
{
  "package_releases": [
    {
      "name": "node-sanitize-html",
      "status": "not affected",
      "release": "sid",
      "version": "2.17.0+~2.16.1-1"
    },
    {
      "name": "node-sanitize-html",
      "status": "not affected",
      "release": "forky",
      "version": "2.17.0+~2.16.1-1"
    },
    {
      "name": "node-sanitize-html",
      "status": "not affected",
      "release": "trixie",
      "version": "2.14.0+~2.13.0-1"
    },
    {
      "name": "node-sanitize-html",
      "status": "not affected",
      "release": "bookworm",
      "version": "2.8.0+~2.6.2-1"
    }
  ],
  "fixed_versions": [
    {
      "bug": null,
      "name": "node-sanitize-html",
      "type": "source",
      "origin": null,
      "release": "sid",
      "urgency": "unimportant",
      "fixed_version": "0"
    },
    {
      "bug": null,
      "name": "node-sanitize-html",
      "type": "source",
      "origin": null,
      "release": "forky",
      "urgency": "unimportant",
      "fixed_version": "0"
    },
    {
      "bug": null,
      "name": "node-sanitize-html",
      "type": "source",
      "origin": null,
      "release": "trixie",
      "urgency": "unimportant",
      "fixed_version": "0"
    },
    {
      "bug": null,
      "name": "node-sanitize-html",
      "type": "source",
      "origin": null,
      "release": "bookworm",
      "urgency": "unimportant",
      "fixed_version": "0"
    }
  ],
  "distribution_packages": []
}

OpenFactory catalog packages

Matching against OpenFactory catalog package versions is in progress.

[Debian 12 (Bookworm)]

  • Details (2)
    • 2.8.0+~2.6.2-1 · all · bookworm

      Not affected

      dsa · node-sanitize-html · debian · bookworm

    • 2.8.0+~2.6.2-1 · all · bookworm

      Not affected

      dsa · node-sanitize-html · debian · bookworm

Observed:

References