HtmlSanitizer vulnerable to Cross-site Scripting in Foreign Content
Impact
The vulnerability occurs in configurations where foreign content is allowed, i.e. either svg or math are in the list of allowed elements.
Specifically, the requirements for the vulnerability are:
- Allowing one foreign element:
svg, ormath - Comments or one raw text element:
iframe,noembed,xmp,title,noframes,styleornoscript
Configurations that meet the above requirements plus the following are vulnerable to an additional vulnerability:
- Any HTML integration element:
title,desc,mi,mo,mn,ms,mtext,annotation-xml.
In case an application sanitizes user input with a vulnerable configuration, an attacker could bypass the sanitization and inject arbitrary HTML, including JavaScript code.
Note that in the default configuration the vulnerability is not present.
Patches
The vulnerability has been fixed in versions 8.0.723 and 8.1.722-beta (preview version).
Workarounds
Disallow foreign elements svg and math. This is the case in the default configuration, which is therefore not affected by the vulnerability.
Betroffene Software
Klicken Sie auf eine Technologie, um alle zugehörigen Schwachstellen anzuzeigen.
| Plattform | Paket | Anfällige Versionen | Behoben in |
|---|---|---|---|
| .NET (NuGet) | HtmlSanitizer | < 8.0.723, >= 8.1.0-beta, < 8.1.722-beta | 8.0.723, 8.1.722-beta |
Verweise
- CVSS-Vektor
CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:L/I:L/A:N- Schwäche (CWE)
CWE-79- Plattform
- .NET (NuGet)
- Paket
HtmlSanitizer- Veröffentlicht
- 04.10.2023
- Aktualisiert
- 11.10.2026 11:23
Quellen und Lizenzen
OSV / GitHub Advisory Database - GHSA-43cp-6p3q-2pc4 - 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
-
HtmlSanitizer vulnerable to Cross-site Scripting in Foreign Content 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.