Live threats

All CVEs / Htmlsanitizer Project

CVE-2020-26293Htmlsanitizer Project Htmlsanitizer

Medium 6.1 No auth needed

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
Weakness (CWE)
CWE-74, CWE-79
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.

Original NVD text.

What to do

  1. Apply the vendor's security update for Htmlsanitizer.
  2. It can be exploited without authentication: if you cannot patch now, restrict Internet access to the affected service.

Affected packages

EcosystemPackageAffected versionsFixed inHow 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)

VendorProductVersions
htmlsanitizer_projecthtmlsanitizer< 5.0.372

Official sources

References

Links published by the sources. Open them with care.