npm package

sanitize-html vulnerabilities by version

The latest release, 2.18.2 (Nov 11, 2026), has no known vulnerabilities. 48% of last week’s 17.1M downloads went to versions with known vulnerabilities. OSV.dev lists 17 advisories for sanitize-html; the newest was published on Oct 21, 2026.

npm (opens in a new tab) describes it as “Clean up user-submitted HTML, preserving allowlisted elements and allowlisted attributes on a per-element basis”

Latest release
2.18.2
Nov 11, 2026, no known vulnerabilities
Downloads last week
17.1M
All versions, from npm
Advisories on OSV.dev
17
Newest Oct 21, 2026
Licence
MIT

Most-downloaded versions last week

From npm’s per-version download counts for the last 7 days, each checked against OSV.dev. Open a version for its advisories and what to upgrade to.

VersionKnown vulnerabilitiesDownloads
2.18.1Oct 14, 2026No known vulnerabilities6M
2.18.2latestNov 11, 2026No known vulnerabilities2.9M
2.17.7Aug 13, 20263 known vulnerabilities, worst rated warning1.5M
2.17.0May 14, 20255 known vulnerabilities, worst rated warning1.1M
2.17.5Jun 10, 20264 known vulnerabilities, worst rated warning989.5K
2.18.0Sep 30, 20261 known vulnerability, worst rated warning804.8K
2.17.6Jul 10, 20263 known vulnerabilities, worst rated warning747K
2.17.4May 13, 20265 known vulnerabilities, worst rated warning558.7K

Who is still on a vulnerable sanitize-html

48% of last week’s 17.1M sanitize-html downloads went to versions with known vulnerabilities.

From npm’s per-version download counts for the last 7 days, each version checked against OSV.dev. The versions checked cover over 99% of downloads.

Release lines

The newest release of each major line, from the registry. sanitize-html doesn’t publish support dates we can check.

LineNewest releaseReleased
22.18.2Nov 11, 2026
11.27.5Sep 23, 2020
0.10.1.4Sep 19, 2013

Newest advisories

The 5 most recently published, with the versions each one affects.

  1. WarningCVE-2026-113650 on OSV.dev (opens in a new tab)GHSA-c9rx-x947-fp3h

    ApostropheCMS sanitize-html: unbounded recursion when re-sanitizing the fallback of a discarded iframe (stack overflow, nestingLimit not enforced)

    Affects >= 2.18.0, < 2.18.1. Published Oct 21, 2026.

  2. LowCVE-2026-113657 on OSV.dev (opens in a new tab)GHSA-374f-7chj-9948

    ApostropheCMS sanitize-html: SMIL animation namespace-prefix bypass allows javascript: URI injection (XSS)

    Affects >= 2.17.7, < 2.18.0. Published Oct 20, 2026.

  3. WarningCVE-2026-113661 on OSV.dev (opens in a new tab)GHSA-cv27-6wvh-8x7j

    ApostropheCMS: Incomplete CVE-2026-53606: `meta http-equiv=refresh` `content` still ships `javascript:` / `data:` URLs

    Affects < 2.18.0. Published Oct 20, 2026.

  4. WarningCVE-2026-113654 on OSV.dev (opens in a new tab)GHSA-x3q4-9hxx-gx8m

    ApostropheCMS sanitize-html: nonTextTags discard region ends early on an implied close, letting <noscript> content render

    Affects < 2.18.0. Published Oct 20, 2026.

  5. WarningCVE-2026-63670 on OSV.dev (opens in a new tab)GHSA-jxwj-j7wr-gfrw

    ApostropheCMS: Mutation-XSS / allowedTags bypass via literal `</textarea/>` solidus close

    Affects < 2.17.6. Published Sep 3, 2026.

All 17 advisories are on OSV.dev (opens in a new tab).

Which sanitize-html do you have?

Paste a public GitHub repo or drop your package.json and see every vulnerable, end-of-life or deprecated dependency, with one fix task for your coding agent. Free, no sign-up.

Check your whole repo

How this page is checked

StackPrism reads every OSV.dev advisory for sanitize-html, merges duplicates filed under several ids, and asks OSV.dev which ones affect each version listed. Releases and their dates come from deps.dev, downloads from npm. No AI writes this page: every sentence comes from that data, refreshed every few hours.

Last checked against OSV.dev, CISA KEV, npm and deps.dev.