HtmlSanitizer: CSS Removal DoS
- CVE-2026-102529
- GHSA-464h-4j8h-q5mf
- EUVD-2026-127548
Description
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.
Text from the CVE.org record.
Recommendation
htmlsanitizer
- If you run 9.1.xupdate to 9.1.968-beta or laterPatch update: breaking changes are unlikelyhtmlsanitizer 9.1.968-beta on its registry (opens in a new tab)
- If you run a version before 9.0.967update to 9.0.967 or laterhtmlsanitizer 9.0.967 on its registry (opens in a new tab)
Taken from the version ranges the sources state. Check the vendor advisory: nothing is said about versions the ranges do not list. Breaking-change risk is read from the version numbers only.
Affected
mganss HtmlSanitizer
Affected versions Fixed in < 9.0.967 none stated >= 9.1.878-beta, < 9.1.968-beta none stated htmlsanitizerNuGet
Affected versions Fixed in from 9.1.878-beta to before 9.1.968-beta 9.1.968-beta before 9.0.967 9.0.967
Product versions from the CVE.org record.
Timeline
- Published
Related news
No article from the followed outlets names this vulnerability.