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.
Betroffene Software
Klicken Sie auf eine Technologie, um alle zugehörigen Schwachstellen anzuzeigen.
| Plattform | Paket | Anfällige Versionen | Behoben in |
|---|---|---|---|
| .NET (NuGet) | HtmlSanitizer | < 5.0.372 | 5.0.372 |
Verweise
- 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
- CVSS-Vektor
CVSS:3.1/AV:N/AC:H/PR:N/UI:R/S:C/C:N/I:H/A:N- Schwäche (CWE)
CWE-74, CWE-79- Plattform
- .NET (NuGet)
- Paket
HtmlSanitizer- Veröffentlicht
- 04.01.2021
- Aktualisiert
- 11.10.2026 11:23
Quellen und Lizenzen
OSV / GitHub Advisory Database - GHSA-8j9v-h2vp-2hhv - CC BY 4.0
Schwachstellenhistorie: HtmlSanitizer
Alle veröffentlichten Schwachstellen dieses Pakets (.NET (NuGet)), neueste zuerst. Zeigt, ob es ein einmaliger Ausrutscher ist oder ein Paket, das man im Auge behalten muss.
- Einträge insgesamt
- 3
- Erste → letzte
- 01.2021 02.2026
- Ohne Fix
- 0
- In Angriffen ausgenutzt
- 0
Verteilung nach Schweregrad
- Mittel 2
- Niedrig 1
Veröffentlichungen pro Jahr
- 2021: 1
- 2022: 0
- 2023: 1
- 2024: 0
- 2025: 0
- 2026: 1
-
XSS in HtmlSanitizer dieser Eintrag
Erkennen Sie Schwachstellen in Ihrer Anwendung
Mit der DockRay-Integration und aktivierter Softwareinventarisierung prüft DockRay gemeldete Komponentenversionen auf bekannte Schwachstellen und benachrichtigt Sie über bestätigte Treffer. Die Abdeckung hängt von der unterstützten Technologie und den verfügbaren Meldungen ab.