Intel

AIKIDO-2026-667119

HtmlSanitizer is vulnerable to Denial of Service (DoS)

Denial of Service (DoS)GHSA-464h-4j8h-q5mf Published Aug 10, 2026

75

High Risk

This Affects:

DOTNETHtmlSanitizer
0.0.1 - 9.0.892
Fixed in 9.0.967
Are you affected? Scan for Free

TL;DR

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.

Who does this affect?

You are affected if you use HtmlSanitizer to clean untrusted or externally supplied HTML in the default configuration.

Background info

HtmlSanitizer is vulnerable to Denial of Service (DoS) in versions 0.0.1 - 9.0.892.

How to fix this

Upgrade the HtmlSanitizer library to the patch version or disallow the style attribute.