HtmlSanitizer is vulnerable to Denial of Service (DoS)
75
High Risk
HtmlSanitizer cleans untrusted HTML and sanitizes inline CSS carried in the style attribute. When it removed disallowed CSS properties or replaced their values, it mutated the style declaration one property at a time, and the underlying CSS engine re-serialized the whole declaration on every change. Sanitizing a style attribute that contains many declarations therefore runs in quadratic time and can occupy a synchronous worker for seconds, so untrusted input can sustain a denial of service. The fix rebuilds the declaration list a single time instead of mutating it per property.
You are affected if you use HtmlSanitizer to clean untrusted or externally supplied HTML in the default configuration.
HtmlSanitizer is vulnerable to Denial of Service (DoS) in versions 0.0.1 - 9.0.892.
Upgrade the HtmlSanitizer library to the patch version or disallow the style attribute.
Connect your repositories to instantly see whether vulnerable or malicious packages exist in your codebase.
Free. No credit card required.

I consent to receiving marketing communications based on Aikido’s Privacy Policy.
SOC 2Compliant
ISO 27001Compliant