CVE-2026-102529: HtmlSanitizer: CSS Removal DoS
HtmlSanitizer is a .NET library for cleaning HTML fragments and documents from constructs that can lead to XSS attacks. Prior to 9.0.967 and 9.1.968-beta, HtmlSanitizer CSS style-declaration sanitization can process an attacker-controlled style attribute with quadratic cost because SanitizeStyleDeclaration repeatedly causes the complete declaration to be serialized while removing disallowed CSS properties. One unauthenticated request can occupy a synchronous application worker for seconds, and concurrent requests can saturate all workers and sustain denial of service. This issue is fixed in versions 9.0.967 and 9.1.968-beta.
Affected Software
Remediation
Recommended actions to resolve this vulnerability, in priority order.
- Upgrade
Upgrade to a fixed release to a version that resolves this vulnerability.
Fixed in 9.0.967 - Upgrade
Upgrade to a fixed release to a version that resolves this vulnerability.
Fixed in 9.1.968-beta
Event History
Frequently Asked Questions
Which applications are exposed to this denial of service?
Applications using affected HtmlSanitizer versions are exposed when they sanitize attacker-controlled HTML containing style attributes. Internet-facing endpoints are particularly at risk because exploitation requires only an unauthenticated request.
What does an attacker need to do to exploit the issue?
An attacker must submit a crafted style attribute containing disallowed CSS properties to code that invokes HtmlSanitizer style-declaration sanitization. No authentication or user interaction is required, and the attack has low complexity.
Does exploitation require a vulnerable default setting?
The issue is triggered during CSS style-declaration sanitization while disallowed CSS properties are removed. The provided information does not identify any separate configuration change or non-default setting required for exploitation.
What is the impact if the issue is exploited?
A single request can occupy a synchronous application worker for seconds. Concurrent crafted requests can exhaust available workers and sustain a denial of service, without stated confidentiality or integrity impact.
Which versions fix the issue?
Upgrade HtmlSanitizer to 9.0.967 or later, or to 9.1.968-beta or later on the 9.1 beta line.