CVE-2026-102529

HtmlSanitizer: CSS Removal DoS

Published Nov 17, 2026 CVSS 3.1 · 7.5 High EPSS n/a KEV · Not listed
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.

Analysis

AI-generated

Technical impact

HtmlSanitizer is a .NET library that removes disallowed CSS properties from style attributes. When an attacker supplies a style string with many properties, the sanitizer repeatedly serializes the entire declaration while stripping forbidden entries, leading to a quadratic processing cost. The routine can occupy an application thread for seconds, and simultaneous requests can exhaust all worker threads, causing a denial of service. The vulnerability does not require authentication and relies on normal use of the sanitizer in web applications.

Affected Systems

The affected product is mganss:HtmlSanitizer. Versions earlier than 9.0.967 and earlier than 9.1.968‑beta are susceptible to the CSS removal denial of service issue.

Risk and Exploitability

The CVSS score of 7.5 classifies this as a high‑severity vulnerability, and the EPSS score is currently unavailable. It is not listed in the CISA KEV catalog. Attackers can exploit this weakness by sending unauthenticated HTTP requests that contain malicious style attributes, and the effect can be amplified by multiple concurrent requests to saturate worker pools. The risk is significant for applications that process untrusted HTML input without additional safeguards.

Remediation

No solution or workaround provided in the CVE record.

OpenCVE Recommended Actions

  • Update HtmlSanitizer to version 9.0.967 or later, including 9.1.968‑beta, to apply the fix for the quadratic cost issue.
  • Ideally remove or pre‑validate all style attributes from untrusted input before passing it to HtmlSanitizer, or configure your application to strip style tags altogether if CSS is not required.
  • If an update cannot be applied immediately, limit the rate of incoming requests that reach the sanitizer or enforce stricter worker timeouts to reduce the impact of denial‑of‑service attempts.

Generated by OpenCVE AI on November 17, 2026 at 21:20 UTC.

Tracking

Sign in to view the affected projects.

Advisories

No advisories available
History
Type Values Removed Values Added
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.
Title HtmlSanitizer: CSS Removal DoS
Weaknesses CWE-407
References
Metrics cvssV3_1

{'score': 7.5, 'vector': 'CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H'}

Subscriptions

No data.

Weaknesses
  • CWE-407

    Inefficient Algorithmic Complexity

Sources

Status
PUBLISHED
Assigner
GitHub_M
Published
Updated
Nov 17, 2026, 8:41 PM
Reserved
Sep 29, 2026, 1:00 PM
Status
Received
Published
Nov 17, 2026, 9:17 PM
Modified
Nov 17, 2026, 9:17 PM