XSS in HtmlSanitizer
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.
Software afectado
Haz clic en una tecnología para ver todas sus vulnerabilidades.
| Plataforma | Paquete | Versiones vulnerables | Corregida en |
|---|---|---|---|
| .NET (NuGet) | HtmlSanitizer | < 5.0.372 | 5.0.372 |
Referencias
- https://github.com/mganss/HtmlSanitizer/security/advisories/GHSA-8j9v-h2vp-2hhv
- https://nvd.nist.gov/vuln/detail/CVE-2020-26293
- https://github.com/mganss/HtmlSanitizer/commit/a3a7602a44d4155d51ec0fbbedc2a49e9c7e2eb8
- https://github.com/mganss/HtmlSanitizer/releases/tag/v5.0.372
- https://www.nuget.org/packages/HtmlSanitizer
- Vector CVSS
CVSS:3.1/AV:N/AC:H/PR:N/UI:R/S:C/C:N/I:H/A:N- Debilidad (CWE)
CWE-74, CWE-79- Plataforma
- .NET (NuGet)
- Paquete
HtmlSanitizer- Publicada
- 04.01.2021
- Actualizado
- 11.10.2026 11:23
Fuentes y licencias
OSV / GitHub Advisory Database - GHSA-8j9v-h2vp-2hhv - CC BY 4.0
Historial de vulnerabilidades: HtmlSanitizer
Todas las vulnerabilidades publicadas de este paquete (.NET (NuGet)), de la más reciente a la más antigua. Muestra si es un fallo aislado o un paquete que hay que vigilar.
- Entradas en total
- 3
- Primera → última
- 01.2021 02.2026
- Sin corrección
- 0
- Explotada en ataques
- 0
Distribución por gravedad
- Media 2
- Baja 1
Divulgaciones por año
- 2021: 1
- 2022: 0
- 2023: 1
- 2024: 0
- 2025: 0
- 2026: 1
-
XSS in HtmlSanitizer esta entrada
Identifica las vulnerabilidades de tu aplicación
Con la integración de DockRay y el inventario de software activado, DockRay compara las versiones notificadas de los componentes con las vulnerabilidades conocidas y avisa de las coincidencias confirmadas. La cobertura depende de la tecnología compatible y de los avisos disponibles.