CVE-2016-1000237: Cross-Site Scripting in sanitize-html

sanitize-html Updated 02 Oct 2025

Summary

16/04/2020
Yes i
Moderate
6.1

CVE-2016-1000237: Cross-Site Scripting in sanitize-html. Affects sanitize-html versions < 1.4.3. Fixed in 1.4.3. How to fix ↓

Free scan

Check if this vulnerability affects your application

Upload a manifest or SBOM and we'll show whether you're affected, plus every other risky package in the same scan.

Check my app free

No signup required · Results in about 60 seconds

Upload your dependency manifest or SBOM

Drag & drop your file here or

Java Javascript PHP Python Go Rust Ruby Dart C/C++ Elixir CycloneDX SPDX

Upload a supported dependency manifest or SBOM. No installation or source-code access required.

See supported files and SBOM formats
SBOM sbom.json · bom.json · bom.xml · *.spdx.json · *.cdx.json · *.cdx.xml
Java pom.xml · gradle.lockfile · buildscript-gradle.lockfile
Javascript package-lock.json · yarn.lock · pnpm-lock.yaml
PHP composer.lock
Python poetry.lock · requirements.txt · Pipfile.lock
Go go.mod
Rust Cargo.lock
Ruby Gemfile.lock
Dart pubspec.lock
C/C++ conan.lock
Elixir mix.lock
Enter your work email to receive your report link.

Verify your email to view the full report and start 30 days of continuous monitoring. No credit card required.

Sponsored Devnack Mobile apps built by Devnack Design, build and launch iOS and Android apps with a senior product team. From idea to store release Start a project

Background

The sanitize-html package is an npm package used for sanitizing HTML input. It is designed to prevent cross-site scripting (XSS) attacks by removing potentially malicious code from user-generated HTML. However, certain versions of the package are vulnerable to a cross-site scripting vulnerability.

Vulnerability Detail

The vulnerability in affected versions of sanitize-html stems from the package's failure to sanitize input recursively. This allows an attacker to inject and execute arbitrary JavaScript code. If exploited, this vulnerability can lead to unauthorized access, data theft, and other malicious activities.

How To Fix

Latest published version: 2.18.1 as of 23 Oct 2026

npm install sanitize-html@2.18.1

Upgrading to it may include breaking changes; the version below is the minimum fixed release for this vulnerability.

If you need the minimum change

1.4.3

This is the first release that contains the fix.

npm install sanitize-html@1.4.3

Tip — Not sure which version your app runs? Vulert can match this fix to it. Scan free →

Workaround

There is no specific workaround provided for this vulnerability. Updating to the latest version is the recommended solution.

Conclusion

The sanitize-html package is vulnerable to a cross-site scripting (XSS) vulnerability that allows for the execution of arbitrary JavaScript code. To mitigate this vulnerability, it is essential to update to version 1.4.3 or later. Vulert Playground can be used to check if your application is affected by this vulnerability. For additional support, contact DevNack.com.

See every vulnerability recorded for sanitize-html →

Share this vulnerability

FAQ

This vulnerability allows an attacker to execute arbitrary JavaScript code, potentially leading to unauthorized access, data theft, and other malicious activities.

You can use Vulert Playground (https://vulert.com/scanner) to check if your application is affected by this vulnerability. Vulert monitors and alerts in real-time for open-source vulnerabilities without requiring access to the code or installation.

The CVSS score of this vulnerability is 6.1, indicating a moderate severity.

There may be known exploits for this vulnerability. It is crucial to update to the latest version of sanitize-html to mitigate the risk of exploitation.

For further support on vulnerability remediation, you can reach out to info@devnack.com.

Related vulnerabilities

Recent vulnerabilities recorded for sanitize-html.

How To Fix

Latest published version: 2.18.1 as of 23 Oct 2026

npm install sanitize-html@2.18.1

Upgrading to it may include breaking changes; the version below is the minimum fixed release for this vulnerability.

If you need the minimum change

1.4.3

This is the first release that contains the fix.

npm install sanitize-html@1.4.3

Tip — Not sure which version your app runs? Vulert can match this fix to it. Scan free →

Subscribe to Vulert on Telegram
Daily digest of new CVEs, critical and high severity, affected packages and fixes — plus a weekly roundup.
Join the channel →
Help improve this record
Report an issue or send feedback