CVE-2020-26293
MEDIUM 6.1CVSS 3.1XSS in HtmlSanitizer
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.
- Published
- 4 Jan 2021
- Last modified
- 10 Sep 2026
- Assigned by
- security-advisories@github.com
- NVD status
- Modified
- Weakness
- CWE-74CWE-79
- Also known as
- GHSA-8j9v-h2vp-2hhv
- Sources
- NVDJSONOSV GHSA-8j9v-h2vp-2hhvJSON
Scores
| Source | Scored by | Version | Score | Vector / decision |
|---|---|---|---|---|
| NVD | security-advisories@github.com (Secondary) | CVSS 3.1 | MEDIUM 6.1 | CVSS:3.1/AV:N/AC:H/PR:N/UI:R/S:C/C:N/I:H/A:N |
| NVD | nvd@nist.gov (Primary) | CVSS 3.1 | MEDIUM 6.1 | CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:L/I:L/A:N |
| OSV | GitHub | CVSS 3.1 | MEDIUM 6.1 | CVSS:3.1/AV:N/AC:H/PR:N/UI:R/S:C/C:N/I:H/A:N |
| NVD | nvd@nist.gov (Primary) | CVSS 2.0 | MEDIUM 4.3 | AV:N/AC:M/Au:N/C:N/I:P/A:N |
Affected
| Source | Vendor / ecosystem | Product / package | Affected versions | Fixed in |
|---|---|---|---|---|
| NVD | htmlsanitizer_project | htmlsanitizercpe:2.3:a:htmlsanitizer_project:htmlsanitizer:*:*:*:*:*:*:*:* |
< 5.0.372 | 5.0.372 |
| OSV | NuGet | HtmlSanitizer | < 5.0.372 | 5.0.372 |
References
- https://github.com/mganss/HtmlSanitizer/commit/a3a7602a44d4155d51ec0fbbedc2a49e9c7e2eb8 · Patch, Third Party Advisory, WEB
- https://github.com/mganss/HtmlSanitizer/releases/tag/v5.0.372 · Release Notes, Third Party Advisory, WEB
- 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, WEB
- https://nvd.nist.gov/vuln/detail/CVE-2020-26293 · ADVISORY
History
- 25 Nov 2026 20:32 UTC · NVD: first stored (published 4 Jan 2021)
- 25 Nov 2026 20:13 UTC · OSV: first stored (published 4 Jan 2021)