All CVEs / Htmlsanitizer Project
CVE-2020-26293Htmlsanitizer Project Htmlsanitizer
Medium 6.1 No auth needed
Follow: this CVE · Htmlsanitizer Project · Htmlsanitizer Project Htmlsanitizer We alert you by email or Slack (account required).
- Priority
- 52
- CVSS 3.1
- 6.1
- EPSS
- 1.0% probability of exploitation in 30 days · percentile 64
- Auth required
- No
- Published
- Jan 4, 2021
- Updated
- Jun 17, 2026
- Category
- Application · Cross-platform
- Vector
CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:L/I:L/A:N
What happens
HtmlSanitizer is a .NET library for cleaning HTML fragments and documents from constructs that can lead to XSS attacks. In HtmlSanitizer before version 5.0.372, there is a possible XSS bypass if style tag is allowed. If you have explicitly allowed the `<style>` tag, an attacker could craft HTML that includes script after passing through the sanitizer. The default settings disallow the `<style>` tag so there is no risk if you have not explicitly allowed the `<style>` tag. The problem has been fixed in version 5.0.372.
What to do
- Apply the vendor's security update for Htmlsanitizer.
- It can be exploited without authentication: if you cannot patch now, restrict Internet access to the affected service.
Affected packages
| Ecosystem | Package | Affected versions | Fixed in | How to upgrade |
|---|---|---|---|---|
| NuGet | HtmlSanitizer |
< 5.0.372 |
5.0.372 |
dotnet add package HtmlSanitizer --version 5.0.372 |
Per OSV / GitHub Advisories (GHSA-8j9v-h2vp-2hhv). Check the version in your lockfile before upgrading.
Affected products (CPE)
| Vendor | Product | Versions |
|---|---|---|
| htmlsanitizer_project | htmlsanitizer | < 5.0.372 |
Official sources
References
Links published by the sources. Open them with care.
- github.com Patch Third Party Advisory
- github.com Release Notes Third Party Advisory
- github.com Third Party Advisory
- www.nuget.org Product Third Party Advisory