CVE-2026-116538
HtmlSanitizer before 9.2.1039 XSS via SanitizeDom Body and HTML Attributes
mganss HtmlSanitizer
CVSS
2.3LowExploitationNo known exploitationNot in CISA KEV, which does not prove it is unexploitedCISA KEV
Exploit odds (EPSS)No scoreNo FIRST EPSS score in this snapshot yet
What fixes it
A fixed version on one release line is not the upgrade target for every line. Check your exact version and any vendor backports.
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.
Text from CVE List
Affected versions 2
- HtmlSanitizeraffected: all versions before 9.2.1039CVE List
- HtmlSanitizeraffected: 10.0.0-beta before 10.0.1037-betaCVE List
References 9
- github.com/mganss/HtmlSanitizer/commit/96afbc818e64de7571ea17954a05d523e819c56fFixvia CVE List
- github.com/mganss/HtmlSanitizer/commit/ab626e7a4f2893f7e9ec0a72779ae19c5ec439a7Fixvia CVE List
- github.com/mganss/HtmlSanitizer/releases/tag/v9.2.1039Fixvia CVE List
- github.com/mganss/HtmlSanitizer/releases/tag/v10.0.1037-betaFixvia CVE List
- vulncheck.com/advisories/htmlsanitizer-before-9.2.1039-xss-via-sanitizedom-body-and-html-attributesAdvisoryvia CVE List
- github.com/mganss/HtmlSanitizer/blob/v9.2.995/src/HtmlSanitizer/HtmlSanitizer.cs#L456-L465Referencevia CVE List
- github.com/mganss/HtmlSanitizer/blob/v9.2.995/src/HtmlSanitizer/HtmlSanitizer.cs#L555-L583Referencevia CVE List
- joshua.hu/htmlsanitizer-sanitizedom-body-html-attribute-bypassReferencevia CVE List
- github.com/mganss/HtmlSanitizerReferencevia CVE List