Possible XSS bypass if style tag is allowed
Key facts
- Attack vector
- Network
- Privileges required
- None
- User interaction
- Required
- Attack complexity
- High
- Impact type
- Cross-site scripting
- Confidentiality · integrity · availability
- None · High · None
- Fix status
- Fixed
Attack profile from CVSS 3.1 · CNA. Fix status from CNA and GitHub. Impact type from CWE-79.
Summary
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.
Why it matters now
SSVC decision points
Not available: CISA has not published SSVC decision points for this record.
Affected products
| Vendor | Product | Affected versions | Fixed in | Status | Source |
|---|---|---|---|---|---|
| mganss | HtmlSanitizer | before 5.0.372 | 5.0.372 | Patch available | CNA |
| — | HtmlSanitizer (NuGet) | before 5.0.372 | 5.0.372 | Patch available | GHSA-8j9v-h2vp-2hhv |
- HtmlSanitizer Vendormganss Affected before 5.0.372 Fixed in 5.0.372 Patch available CNA
- HtmlSanitizer (NuGet) Vendor— Affected before 5.0.372 Fixed in 5.0.372 Patch available GHSA-8j9v-h2vp-2hhv
Remediation
- Fix · CNA HtmlSanitizer (mganss) Fixed in 5.0.372
- Fix · GHSA-8j9v-h2vp-2hhv HtmlSanitizer (NuGet) Fixed in 5.0.372 Advisory →
Timeline
- 2026-10-02 Threatist record created from CVE-2020-26293
- 2026-10-03 Alias added: GHSA-8j9v-h2vp-2hhv
References
Advisory 4
More mganss Htmlsanitizer vulnerabilities
- TI-2026-20652 HtmlSanitizer has a bypass via template tag CVSS 4.0MEDIUM 6.3
- TI-2023-23896 HtmlSanitizer vulnerable to Cross-site Scripting in Foreign Content CVSS 3.1MEDIUM 6.1
Sources
- CVE-2020-26293 · CVE Program
- CVE-2020-26293 · NVD
- FIRST EPSS
- GHSA-8j9v-h2vp-2hhv · GitHub Advisory Database · CC BY 4.0
This product uses the NVD API but is not endorsed or certified by the NVD. Sources and licences