Vulnerability · Published Oct 26, 2026 · Assigned by VulnCheck
CVE-2026-116538HtmlSanitizer before 9.2.1039 XSS via SanitizeDom Body and HTML Attributes
Medium 4.7
In plain English
A medium-severity cross-site scripting in HtmlSanitizer from mganss. There are no confirmed reports of exploitation so far. The chance it is exploited in the next 30 days is estimated at 0.3% (higher than 21% of all known vulnerabilities).
Official description
HtmlSanitizer before 9.2.1039 and 10.0 prereleases before 10.0.1037-beta contains a cross-site scripting vulnerability because SanitizeDom(string) never sanitizes attributes on the html and body wrapper elements. Attackers can supply input with a second body or html tag carrying event handlers like onload, executing script when applications render serialized document or body outer HTML.
Affected products (as reported)
| Vendor | Product | Versions |
|---|---|---|
| mganss | HtmlSanitizer | 0 – before 9.2.103910.0.0-beta – before 10.0.1037-beta |
Weakness: CWE-79 · Vector: CVSS:3.1/AV:N/AC:H/PR:N/UI:R/S:C/C:L/I:L/A:N
References
- Patch Commit patch
- https://github.com/mganss/HtmlSanitizer/commit/ab626e7a4f2893f7e9ec0a72779ae19c5ec439a7 patch
- https://github.com/mganss/HtmlSanitizer/blob/v9.2.995/src/HtmlSanitizer/HtmlSanitizer.cs#L456-L465 technical-description
- https://github.com/mganss/HtmlSanitizer/blob/v9.2.995/src/HtmlSanitizer/HtmlSanitizer.cs#L555-L583 technical-description
- https://joshua.hu/htmlsanitizer-sanitizedom-body-html-attribute-bypass technical-description
- HtmlSanitizer v9.2.1039 Release Notes release-notes
- HtmlSanitizer v10.0.1037-beta Release Notes release-notes
- https://github.com/mganss/HtmlSanitizer product
- VulnCheck Advisory: HtmlSanitizer before 9.2.1039 XSS via SanitizeDom Body and HTML Attributes third-party-advisory