CVE-2026-116538: mganss HtmlSanitizer · Cross-site Scripting
Affects mganss HtmlSanitizerSource CVE Database V5
Not known to be exploited · CVSS 2.3 Low : upgrade to 10.0.1037-beta or 9.2.1039 when convenient.
Data as of 26 Oct 2026, 16:53 UTC
- Patch
- Available – fixed in 10.0.1037-beta, 9.2.1039
CVSS:4.0/AV:N/AC:L/AT:P/PR:N/UI:P/VC:N/VI:N/VA:N/SC:L/SI:L/SA:NExploitation evidence
Disclosed: evidence found.
CVE published 26 Oct 2026
Detectable: no evidence on record.
No public nuclei template indexed
Weaponised: no evidence on record.
No public exploit code indexed in Metasploit or Exploit-DB
Exploited in the wildExploited: no evidence on record.
Not in CISA KEV and no source reports exploitation
Observed by OffSeq MirageSeen by Mirage: no evidence on record.
No attack traffic recorded by OffSeq Mirage sensors
A missing step is not evidence of safety. Sources: cve.org (opens in a new tab), the Metasploit, Exploit-DB and nuclei-templates index as of 26 Oct 2026.
What to do
Upgrade mganss HtmlSanitizer to 10.0.1037-beta or 9.2.1039.
Affected software
| Product | Affected | Fixed in |
|---|---|---|
| mganssHtmlSanitizer | Affected
| Fixed in
|
| mganssHtmlSanitizer | Affected
| Fixed in
|
NuGetHtmlSanitizerpkg:nuget/HtmlSanitizerOther threats | Affected
| Fixed in
|
Check your own hosts for these packages with threat-finder (opens in a new tab), our free open-source scanner.
AI-suggested
Upgrade HtmlSanitizer to version 9.2.1039 or later, or 10.0.1037-beta or later. These versions contain the fix that properly sanitizes attributes on the html and body wrapper elements. No other mitigation is required as the vulnerability is addressed in these fixed releases.
Description
HtmlSanitizer versions before 9.2.1039 and prereleases before 10.0.1037-beta contain a cross-site scripting (XSS) vulnerability. The function SanitizeDom(string) does not sanitize attributes on the html and body wrapper elements, allowing attackers to inject a second html or body tag with event handlers such as onload. This can lead to script execution when the application renders the serialized document or body outer HTML. The vulnerability has a low CVSS score of 2.3 and is fixed in versions 9.2.1039 and 10.0.1037-beta.
References
- github.com/mganss/HtmlSanitizer/commit/96afbc818e64de7571ea17954a05d523e819c56f (opens in a new tab)
- github.com/mganss/HtmlSanitizer/commit/ab626e7a4f2893f7e9ec0a72779ae19c5ec439a7 (opens in a new tab)
- github.com/mganss/HtmlSanitizer/blob/v9.2.995/src/HtmlSanitizer/HtmlSanitizer.cs (opens in a new tab)
- github.com/mganss/HtmlSanitizer/blob/v9.2.995/src/HtmlSanitizer/HtmlSanitizer.cs (opens in a new tab)
- joshua.hu/htmlsanitizer-sanitizedom-body-html-attribute-bypass (opens in a new tab)
- github.com/mganss/HtmlSanitizer/releases/tag/v9.2.1039 (opens in a new tab)
- github.com/mganss/HtmlSanitizer/releases/tag/v10.0.1037-beta (opens in a new tab)
- github.com/mganss/HtmlSanitizer (opens in a new tab)
- vulncheck.com/advisories/htmlsanitizer-before-9.2.1039-xss-via-sanitizedom-body-and-html-attributes (opens in a new tab)