CVE-2020-26293
Possible XSS bypass if style tag is allowed
Severity Score
Exploit Likelihood
Affected Versions
Public Exploits
0Exploited in Wild
-Decision
Descriptions
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.
HtmlSanitizer es una biblioteca .NET para limpiar fragmentos HTML y documentos de construcciones que pueden conllevar a ataques de tipo XSS. En HtmlSanitizer versiones anteriores a 5.0.372, se presenta una posible omisión de XSS si la etiqueta de estilo es permitida. Si ha permitido explícitamente la etiqueta "(style)", un atacante podría crear HTML que incluya un script después de pasar a través del sanitizador. La configuración predeterminada no permite la etiqueta "(style)", por lo que no existe riesgo si no ha permitido explícitamente la etiqueta "(style)". El problema ha sido corregido en la versión 5.0.372.
CVSS Scores
SSVC
- Decision:-
Timeline
- 2020-10-01 CVE Reserved
- 2021-01-04 CVE Published
- 2024-08-04 CVE Updated
- 2025-03-30 EPSS Updated
- ---------- Exploited in Wild
- ---------- KEV Due Date
- ---------- First Exploit
CWE
- CWE-74: Improper Neutralization of Special Elements in Output Used by a Downstream Component ('Injection')
- CWE-79: Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting')
CAPEC
References (4)
URL | Tag | Source |
---|---|---|
https://github.com/mganss/HtmlSanitizer/releases/tag/v5.0.372 | Release Notes | |
https://github.com/mganss/HtmlSanitizer/security/advisories/GHSA-8j9v-h2vp-2hhv | Third Party Advisory | |
https://www.nuget.org/packages/HtmlSanitizer | Product |
URL | Date | SRC |
---|
URL | Date | SRC |
---|---|---|
https://github.com/mganss/HtmlSanitizer/commit/a3a7602a44d4155d51ec0fbbedc2a49e9c7e2eb8 | 2021-01-07 |
URL | Date | SRC |
---|
Affected Vendors, Products, and Versions
Vendor | Product | Version | Other | Status | ||||||
---|---|---|---|---|---|---|---|---|---|---|
Vendor | Product | Version | Other | Status | <-- --> | Vendor | Product | Version | Other | Status |
Htmlsanitizer Project Search vendor "Htmlsanitizer Project" | Htmlsanitizer Search vendor "Htmlsanitizer Project" for product "Htmlsanitizer" | < 5.0.372 Search vendor "Htmlsanitizer Project" for product "Htmlsanitizer" and version " < 5.0.372" | - |
Affected
|