CVE-2026-44990: Critical XSS Vulnerability in sanitize-html Package

sanitize-html Updated 14 May 2026

Summary

14/05/2026
No i
Critical
9.3

CVE-2026-44990: Apostrophe has default XSS via xmp raw-text passthrough in sanitize-html. Affects sanitize-html versions < 2.17.3. No fix is published. 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 MarkAI Find prospects already talking about the problem you solve AI watches the communities your customers use to find qualified prospects, then alerts you when a conversation is worth joining. See MarkAI

Background

The sanitize-html package is a widely used library in the Node.js ecosystem that allows developers to sanitize HTML content by removing potentially harmful tags and attributes. It is designed to help prevent cross-site scripting (XSS) attacks by ensuring that only safe HTML is rendered in web applications. However, a critical vulnerability has been identified in the default configuration of sanitize-html, specifically in version 2.17.3, which can lead to serious security risks if not addressed.

Vulnerability Detail

The vulnerability arises from a flaw in the handling of disallowed HTML tags, particularly the 'xmp' tag. Under the default configuration, sanitize-html does not treat the 'xmp' tag as a drop-the-contents tag, allowing attacker-controlled content within it to be processed as live HTML or JavaScript. This can lead to stored XSS vulnerabilities in applications that render sanitized output back to users. The issue is exacerbated by the fact that the README documentation does not accurately reflect the behavior of the sanitizer, leading to potential misuse by developers.

How To Fix

No fixed version is published for this vulnerability.

Tip — Not sure whether your app is affected? Vulert can check the versions your app actually runs. Scan free →

Workaround

As a temporary workaround, developers can avoid using the 'xmp' tag in their HTML content or ensure that any content passed to sanitize-html is thoroughly vetted and does not include potentially harmful tags. Additionally, consider using a custom configuration for sanitize-html that explicitly disallows the 'xmp' tag.

Conclusion

The CVE-2026-44990 vulnerability in the sanitize-html package poses a significant risk to applications that rely on its default configuration. It is crucial for developers to update to the latest version of the package and implement best practices for sanitizing HTML content to mitigate the risk of XSS attacks.

See every vulnerability recorded for sanitize-html →

Share this vulnerability

FAQ

The CVSS score of this vulnerability is 9.3, indicating a critical level of risk.

You can use the Vulert playground at Vulert Scanner to check if your application is affected by this vulnerability without requiring any signup.

If exploited, this vulnerability can allow attackers to execute arbitrary JavaScript in the context of another user's browser, leading to data theft, session hijacking, or other malicious activities.

Yes, updating to the latest version of sanitize-html will ensure that you are using a version that has addressed this vulnerability.

If an immediate update is not possible, consider implementing a workaround by avoiding the use of the 'xmp' tag and ensuring that any HTML content is properly sanitized before being rendered.

Related vulnerabilities

Recent vulnerabilities recorded for sanitize-html.

How To Fix

No fixed version is published for this vulnerability.

Tip — Not sure whether your app is affected? Vulert can check the versions your app actually runs. 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