# CVE-2020-26293: Possible XSS bypass if style tag is allowed

- Severity: Medium 6.1 (CVSS:3.1, scored by GitHub_M) `CVSS:3.1/AV:N/AC:H/PR:N/UI:R/S:C/C:N/I:H/A:N`
- Known to be exploited: not in CISA's catalogue, which lists only what CISA has confirmed
- Likelihood of exploitation in the next 30 days (EPSS): 1.01%, higher than 64% of CVEs (2026-12-01)
- Published: 2021-01-04T18:20:14.000Z
- Modified: 2026-09-10T03:49:14.279Z
- Also known as: GHSA-8j9v-h2vp-2hhv
- Weaknesses: CWE-74, CWE-79
- Assigned by: GitHub_M

## Description

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.

(As written by CVE List.)

## Affected

- mganss HtmlSanitizer: < 5.0.372
- HtmlSanitizer (NuGet): before 5.0.372
- htmlsanitizer_project htmlsanitizer: before 5.0.372

## Every score

- GitHub_M: CVSS:3.1 6.1 Medium `CVSS:3.1/AV:N/AC:H/PR:N/UI:R/S:C/C:N/I:H/A:N`
- GitHub: CVSS:3.1 6.1 Low `CVSS:3.1/AV:N/AC:H/PR:N/UI:R/S:C/C:N/I:H/A:N`
- NVD: CVSS:3.1 6.1 Medium `CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:L/I:L/A:N`
- NVD: CVSS:2.0 4.3 Medium `AV:N/AC:M/Au:N/C:N/I:P/A:N`

## References

- <https://github.com/mganss/HtmlSanitizer/security/advisories/GHSA-8j9v-h2vp-2hhv> (third-party-advisory, web)
- <https://www.nuget.org/packages/HtmlSanitizer/> (product, third-party-advisory)
- <https://github.com/mganss/HtmlSanitizer/releases/tag/v5.0.372> (release-notes, third-party-advisory, web)
- <https://github.com/mganss/HtmlSanitizer/commit/a3a7602a44d4155d51ec0fbbedc2a49e9c7e2eb8> (patch, third-party-advisory, web)
- <https://nvd.nist.gov/vuln/detail/CVE-2020-26293> (advisory)
- <https://www.nuget.org/packages/HtmlSanitizer> (web)

## Sources

- CVE List: [CVE-2020-26293](https://www.cve.org/CVERecord?id=CVE-2020-26293), CVE Terms of Use, modified 2024-08-04
- GitHub Advisory Database: [GHSA-8j9v-h2vp-2hhv](https://github.com/advisories/GHSA-8j9v-h2vp-2hhv), CC-BY-4.0, modified 2026-09-10
- NVD: [CVE-2020-26293](https://nvd.nist.gov/vuln/detail/CVE-2020-26293), Public domain, modified 2026-06-17

---

Page: https://cve.day/CVE-2020-26293 · Whole record: https://cve.day/CVE-2020-26293.json · Rebuilt by cve.day 2026-11-25T22:57:56.855Z
