CVE-2026-102529: HtmlSanitizer: CSS Removal DoS
High CVSS 7.5
- OSV id
- GHSA-464h-4j8h-q5mf
- Also known as
- CVE-2026-102529
- Published
- Last modified
Affected packages
| Package | Affected versions | Fixed in |
|---|---|---|
| HtmlSanitizer NuGet |
< 9.0.967 | 9.0.967 |
| HtmlSanitizer NuGet |
>= 9.1.878-beta, < 9.1.968-beta | 9.1.968-beta |
How to fix it
HtmlSanitizer (NuGet)
Upgrade HtmlSanitizer to 9.0.967 or later.
dotnet add package HtmlSanitizer --version 9.0.967
dotnet restore --force-evaluate
- If it is an indirect (transitive) dependency, add a direct PackageReference to the fixed version, or upgrade the package that depends on it; `dotnet list package --include-transitive` shows which one.
- Check the changelog for breaking changes (especially across major versions), update the lockfile with the package manager, and run your tests.
HtmlSanitizer (NuGet)
Upgrade HtmlSanitizer to 9.1.968-beta or later.
dotnet add package HtmlSanitizer --version 9.1.968-beta
dotnet restore --force-evaluate
- If it is an indirect (transitive) dependency, add a direct PackageReference to the fixed version, or upgrade the package that depends on it; `dotnet list package --include-transitive` shows which one.
- Check the changelog for breaking changes (especially across major versions), update the lockfile with the package manager, and run your tests.
Not sure whether your project uses an affected version? Check your lockfile below for free.
Details
Impact
An unauthenticated request can occupy one synchronous application worker for seconds. Concurrent requests add CPU cost and can keep all workers busy, sustaining denial of service without user interaction.
Patches
The issue has been patched in versions 9.0.967 and 9.1.968-beta.
Workarounds
Disallow the style attribute.
References
- GHSA-464h-4j8h-q5mf on OSV.dev
- Web: https://github.com/mganss/HtmlSanitizer/security/advisories/GHSA-464h-4j8h-q5mf
- Advisory: https://nvd.nist.gov/vuln/detail/CVE-2026-102529
- Web: https://github.com/mganss/HtmlSanitizer/commit/6198e0494f96707171bf606689949d5360f7e4c5
- Package: https://github.com/mganss/HtmlSanitizer
- Web: https://github.com/mganss/HtmlSanitizer/releases/tag/v9.1.973
Am I affected?
Upload or paste your lockfile. We check every package version in it against OSV.dev, this advisory included, and email you the vulnerable ones with the version that fixes them. Free, and no account needed.
About this data
Source: GitHub Advisory Database via OSV.dev (CC-BY 4.0). Severity comes from the advisory's own rating when it has one, else from its CVSS score.