Skip to main content

HtmlSanitizer EUVDEUVD-2026-127548

| CVE-2026-102529 HIGH
Inefficient Algorithmic Complexity (CWE-407)
2026-11-17 GitHub_M GHSA-464h-4j8h-q5mf
7.5
CVSS 3.1 · Vendor: GitHub_M
View

Attack ChainAIDerived

Hypothetical attack flow derived from CVE metadata – not a confirmed exploit chain

  1. Access
    Reach endpoint accepting user HTML
  2. Delivery
    Submit style attribute with many CSS declarations
  3. Exploit
    Trigger quadratic re-serialization in SanitizeStyleDeclaration
  4. Execution
    CPU-bound worker blocked for seconds
  5. Persist
    Repeat concurrently to saturate all workers
  6. Impact
    Service denial

Vulnerability Assessment

Weakness
CWE
ASVS 5.0
V2 - Validation and Business Logic Algorithmic complexity limits
Exploitation Conditions

Exploitation requires an application that passes attacker-controlled HTML through HtmlSanitizer (versions < 9.0.967, or the 9.1 beta line < 9.1.968-beta) with the style attribute permitted in the allow-list; the attacker supplies a style attribute containing many CSS property declarations so that disallowed-property removal repeatedly re-serializes the full declaration (quadratic cost). Per CVSS PR:N/UI:N the request is unauthenticated and needs no user interaction. Limiting factors: impact is greatest on synchronous/single-threaded worker models (the advisory measures impact as occupying one synchronous worker for seconds), and the vendor-documented workaround of disallowing the style attribute fully removes the attack surface; applications that already strip or disallow style are not affected.

Impact

This is a genuine, well-characterized availability issue but not an urgent, mass-exploitation emergency. The CVSS 3.1 vector (AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H, 7.5) is internally consistent and matches the description: a single unauthenticated network request with no user interaction can cause high availability impact (CPU exhaustion) with no confidentiality or integrity effect, which is the expected shape for a CWE-407 algorithmic-complexity (quadratic) flaw. No EPSS score, no CISA KEV listing, and no verified exploit code were supplied, so there is no evidence of active exploitation - the signals point to a plausible but not yet observed-in-the-wild DoS. The vuln.today decision label is 'this_week', consistent with a high-severity-but-non-emergency item: prioritize patching this week rather than treat as an immediate incident. The main limiting factor is that real-world impact depends heavily on deployment: the damage is pronounced for synchronous/single-threaded worker models (the advisory explicitly frames impact in terms of occupying 'one synchronous application worker for seconds'), and applications must actually pass attacker-controlled HTML through HtmlSanitizer with the style attribute permitted. The commit diff confirms the mechanism (AngleSharp.Css re-serializes the whole style declaration on every SetProperty/RemoveProperty call), so the trigger is understood rather than inferred.

Exploit ScenarioDerived

An attacker submits a single HTTP request containing an HTML fragment with a style attribute holding a large number of (mostly disallowed) CSS property declarations to an endpoint that cleans user HTML with a vulnerable HtmlSanitizer version. Because removing each disallowed property re-serializes the entire declaration, processing cost grows quadratically and one request ties up a synchronous application worker for seconds; a handful of concurrent requests saturate all workers and sustain denial of service. No public exploit code was identified, though the fix commit publicly describes the quadratic mechanism.

This Week Schedule remediation this week. Why: HIGH severity (CVSS 7.0-8.9).
Patch available 0.6% exploitation probability (EPSS)

Get an e-mail when this CVE is exploited, patched or re-scored. Free account.

Alert me

AnalysisAIv1 – Nov 18, 2026

HtmlSanitizer, a .NET library for cleaning HTML fragments and documents, can be forced into sustained CPU denial of service by an unauthenticated request that supplies a style attribute containing many CSS declarations; repeated removal of disallowed properties re-serializes the complete declaration, making sanitization quadratic in the number of declarations. One request can occupy a synchronous application worker for seconds, and concurrent requests can saturate all workers without user interaction. The issue affects versions before 9.0.967 and the 9.1 beta line before 9.1.968-beta, is rated CVSS 7.5 with high availability impact, and has vendor fixes; no public exploit has been identified at time of analysis.

RemediationAI

Vendor-released patches are available: upgrade to HtmlSanitizer 9.0.967 or 9.1.968-beta, or a later release; the advisory also references release v9.1.973. If immediate upgrade is not possible, apply the vendor-documented workaround and disallow the style attribute in the sanitizer's allow-list; this removes the affected SanitizeStyleDeclaration path and fully closes the attack surface, at the cost of stripping all CSS styling from sanitized HTML, which may change presentation. The vendor advisory is https://github.com/mganss/HtmlSanitizer/security/advisories/GHSA-464h-4j8h-q5mf and the fix commit is https://github.com/mganss/HtmlSanitizer/commit/6198e0494f96707171bf606689949d5360f7e4c5. Applications that already disallow or strip the style attribute are not affected; no other workaround is documented.

Affected VersionsENISA

HtmlSanitizer < 9.0.967
HtmlSanitizer 9.1.878-beta, < 9.1.968-beta

Affected Packages

nuget htmlsanitizer fix: 9.0.967, 9.1.968-beta

Source: OSV (Open Source Vulnerabilities)

Affects your stack

Affects 1 package in nuget

Checking this CVE against your own stacks and servers is part of the Basic plan and up.

Technical ContextAI · show details

HtmlSanitizer is a .NET HTML sanitization library distributed as the mganss/HtmlSanitizer NuGet package, used to remove XSS-capable constructs from HTML fragments and documents. The affected code path is SanitizeStyleDeclaration, which processes CSS declarations in an allowed style attribute. In vulnerable versions, each disallowed CSS property is removed through RemoveStyle and AngleSharp.Css's RemoveProperty, and that operation re-serializes the entire style declaration on every call; with an attacker-controlled style attribute containing many declarations, the total work grows quadratically, matching CWE-407 (Inefficient Algorithmic Complexity). The supplied commit 6198e0494f96707171bf606689949d5360f7e4c5 replaces per-property mutation with a single pass that builds the retained declaration text in a StringBuilder and assigns CssText once. The CPE cpe:2.3:a:mganss:htmlsanitizer:*:*:*:*:*:*:*:* identifies the affected NuGet package; exploitation requires an application that passes attacker-controlled HTML through the sanitizer with the style attribute permitted, and the effect is availability-only CPU exhaustion, not code execution or an XSS bypass.

Know when Htmlsanitizer gets its next vulnerability

  • Watch products and get an email when something new is published
  • Check this CVE against your own stack and servers
  • Exploit and PoC references, threat intelligence from 22 sources

No credit card · 7-day full trial

Severity by source

Vendor (GitHub_M) PRIMARY 7.5 HIGH
AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H
vuln.today AI 7.5 HIGH

Single unauthenticated remote request with no interaction triggers quadratic CPU cost (AV:N/AC:L/PR:N/UI:N); only availability is affected, so C:N/I:N/A:H, scope unchanged.

3.1 AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H
4.0 AV:N/AC:L/AT:N/PR:N/UI:N/VC:N/VI:N/VA:H/SC:N/SI:N/SA:N

Primary rating from Vendor (GitHub_M).

CVSS VectorVendor: GitHub_M

Attack Vector
Network
Attack Complexity
Low
Privileges Required
None
User Interaction
None
Scope
Unchanged
Confidentiality
None
Integrity
None
Availability
High

Lifecycle Timeline

2
Patch available
Nov 17, 2026 - 22:04 EUVD
CVE Published
Nov 17, 2026 - 20:41 cve.org
HIGH 7.5

DescriptionCVE.org

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.

Technical POC Analysis

CWE-407, Inefficient Algorithmic Complexity.

Full technical POC analysis - root cause, step-by-step exploitation and patch breakdown - is part of the Pro and Business plans.

Executive ViewAI

Why It Matters

The HtmlSanitizer library, used to clean HTML input, contains a high-severity flaw that allows an unauthenticated attacker to exhaust server CPU by sending a crafted style attribute, potentially taking down web applications for all users. Leadership should prioritize patching because this vulnerability can cause significant operational disruption with minimal attacker effort.

Business Impact: High
Compensating Controls

Apply vendor patch.

Threat Intelligence Overview

EPSS Score
0.6%
Top 51% exploitable
Prevalence
Medium
popular .NET/NuGet HTML-sanitization library, widely used but not universal
Threat Intel
1
1 source
Data Quality
5 sources
Confidence: Medium

How this decision was reached

The engine reads each signal below and applies a fixed list of rules from top to bottom. The first rule that matches sets the recommended action – like a statement, every line is shown.

SignalValue
Severity HIGH
CISA KEV No
Public POC No
EPSS 0.6%
Patch available Yes
Active threat No
Deciding rule
HIGH severity (CVSS 7.0-8.9)
What every action level means
Emergency Immediate action required. Criteria: CRITICAL + in CISA KEV (actively exploited) without patch, OR CRITICAL + EPSS > 30% without patch, OR CRITICAL + active threat signals without patch.
Act Now Prioritize within 24-48h. Criteria: in KEV with patch available, OR CRITICAL + public POC, OR HIGH + EPSS > 10%, OR CRITICAL + active threat, OR any CRITICAL severity.
This Week Schedule remediation this week. Criteria: HIGH severity (CVSS 7.0-8.9). Patch within normal change window.
This Month Plan within 30 days. Criteria: MEDIUM severity (CVSS 4.0-6.9), lower exploitation probability. Include in regular patch cycle.
Monitor Track and reassess. Criteria: LOW severity (CVSS 0.1-3.9), minimal exploitation risk. No immediate action needed.

SSVC AssessmentENISA

SSVC Decision· derived
Scheduled
Exploitation· derived
None
System Exposure· derived
Open
Automatable· derived
Yes
Human Impact
High

Priority Score

39
Low Medium High Critical
KEV: 0
EPSS: +1
CVSS: +38
PoC: 0
Weaponized: 0
Threat intel: 0
Gov advisory: 0

Attack Technique

Cross-Site Scripting occurs when an application accepts untrusted data and sends it to a web browser without proper validation or encoding.

Denial of Service attacks render applications or systems unavailable by overwhelming resources or triggering failure conditions.

This site uses cookies essential for authentication and security. No tracking or analytics cookies are used. Privacy Policy