npm package report

Is sanitize-html safe?

sanitize-html (npm) has 17 known vulnerabilities, the worst rated CRITICAL. Upgrade to 2.18.1 or later to clear all of them. No malicious-package signal is recorded.

// reach

23 direct dependencies

5 carry known advisories, worst CRITICAL

29 packages depend on it

an advisory here reaches each of them

Create a free accountfor every dependency path, dependent and what to upgrade
// ai model usage

Tracked for PyPI packages. HuggingFace models declare Python dependencies, so npm packages are not covered.


cvss
9.3
critical

CVSS v3.1 base score out of 10

epss
0.68%
medium

chance of exploitation in 30 days, 53rd percentile of all CVEs

xyz score
5.0
medium

CyberXYZ composite out of 10

fig. 01 — GHSA-rpr9-rxv7-x643, the advisory selected below

// 17 advisories

Under the default configuration, sanitize-html can turn attacker-controlled content inside a disallowed xmp element into live HTML or JavaScript.

Full advisory text at GitHub advisory, NVD or OSV.

// cvss v3.1 vector

CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:H/I:H/A:N

Attack vector
Network
Attack complexity
Low
Privileges required
None
User interaction
Required
Scope
Changed
Confidentiality
High
Integrity
High
Availability
None
// questions
Is sanitize-html safe to install?

CyberXYZ does not call a package safe in absolute terms. It records 17 known vulnerabilities for sanitize-html (npm), the worst rated CRITICAL, and no malicious-package signal. Whether it is acceptable depends on the version you run.

Does sanitize-html have known vulnerabilities?

Yes. CyberXYZ records 17 known vulnerabilities for sanitize-html (npm), the worst rated CRITICAL. These include GHSA-rpr9-rxv7-x643, GHSA-cgfm-xwp7-2cvr, GHSA-c9rx-x947-fp3h, GHSA-x3q4-9hxx-gx8m, GHSA-cv27-6wvh-8x7j.

Which version of sanitize-html should I use?

2.18.1 or later clears every advisory recorded for sanitize-html (npm). Check the release you pick before installing it.

How do I check sanitize-html before installing?

Search sanitize-html in CyberXYZ Check at https://cyberxyz.io/check?q=sanitize-html. The xyz Scanner checks a project's dependencies, and CyberXYZ Proxy checks each package as it is installed.


Checked 2026-11-14 at 09:15 UTC. The most recent advisory here was published 2026-10-21. Updated continuously from NVD, GHSA, OSV and CNA feeds.

Think a verdict here is wrong? Tell us — we respond within 2 business days.