NIST deprecates RSA-2048 from 2030. Find every one of them before attackers do.
.NET
.NET NuGet
Not in CISA KEV
MEDIUM severity

CVE-2020-26293 — HtmlSanitizer

MEDIUMFix: mganss/HtmlSanitizer@a3a7602

CVE-2020-26293 is a medium-severity (CVSS 6.1) CWE-74 vulnerability in HtmlSanitizer. A fix is available for HtmlSanitizer — see the affected versions and patch details below.

XSS in HtmlSanitizer

Also known asGHSA-8j9v-h2vp-2hhv
Published
Updated
Affected
1 pkg
Patched
1 / 1
Exploits
None indexed
Exploitation data as of Oct 31, 2026 · OSV.dev, NVD, FIRST.org (EPSS)

EPSS Exploitation Probability

via FIRST.org ↗
1.0%probability of exploitation in next 30 days
Lower Risk0.00%
Lower risk than most CVEs63th percentile — riskier than 63% of all scored CVEsHighest risk
0.00%0.50%1.01%1.51%0.3%1.0%May 26Sep 26Oct 26

Probability of exploitation in the next 30 days, from FIRST.org EPSS.

How urgent is this, really

Where this sits among everything scored

Real-World Exposure

1 pkg affected
.NETHtmlSanitizer

Real-time download stats are indexed for npm and PyPI packages. This vulnerability affects NuGet packages — download data is not available via public APIs for these ecosystems.

Description

Impact

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.

Patches

The problem has been fixed in version 5.0.372.

Workarounds

Remove the <style> tag from the set of allowed tags.

For more information

If you have any questions or comments about this advisory open an issue in https://github.com/mganss/HtmlSanitizer

Credits

This issue was discovered by Michal Bentkowski of Securitum.

Affected Packages

1 total 1 fixed
EcosystemPackageVulnerable rangeFix
.NETNuGetHtmlSanitizerall versions5.0.372dotnet add package HtmlSanitizer --version 5.0.372

Affected Products

1 product · 1 configurations
Application
htmlsanitizerhtmlsanitizer_project
< 5.0.372
range

Detection & mitigation playbook

Open-source dependency
  1. Detect

    Scan your dependency tree (package-lock.json, pnpm-lock.yaml, requirements.txt, go.sum, etc.) for HtmlSanitizer, including transitive dependencies — a direct dependency you never call can still pull in a vulnerable version.

  2. Fix

    Update HtmlSanitizer to 5.0.372 or later, then make sure no transitive (indirect) dependency still pins the vulnerable range — O3 confirms CVE-2020-26293 is resolved across your whole dependency graph.

  3. Workarounds

    Escape or sanitise the affected output on the server side rather than relying on client-side filtering, and add a Content-Security-Policy that blocks inline script execution so injected markup cannot run even if it reaches the page.

Frequently Asked Questions

### Impact 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. ### Patches The problem has been fixed in version 5.0.372. ### Workarounds Remove the `<style>` tag from the set of allowed tags. ### For more information If you have any questions or comments about this advisory open an issue in https://github.com/mganss/HtmlSanitizer ### Credits This issue was discovered by Michal Ben
O3 Security · Impact-Aware SCA

Is CVE-2020-26293 in your dependencies?

Find it across NuGet, including transitive dependencies.

CVE-2020-26293: HtmlSanitizer — Fixed in 5.0.372