{"id":"CVE-2026-116538","summary":"HtmlSanitizer before 9.2.1039 XSS via SanitizeDom Body and HTML Attributes","details":"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.","modified":"2026-11-01T02:30:34.617528331Z","published":"2026-10-26T14:59:38.815Z","database_specific":{"cwe_ids":["CWE-79"],"osv_generated_from":"https://github.com/CVEProject/cvelistV5/tree/main/cves/2026/116xxx/CVE-2026-116538.json","cna_assigner":"VulnCheck"},"references":[{"type":"WEB","url":"https://www.nuget.org/packages/HtmlSanitizer"},{"type":"ADVISORY","url":"https://github.com/CVEProject/cvelistV5/tree/main/cves/2026/116xxx/CVE-2026-116538.json"},{"type":"ADVISORY","url":"https://github.com/mganss/HtmlSanitizer/releases/tag/v10.0.1037-beta"},{"type":"ADVISORY","url":"https://github.com/mganss/HtmlSanitizer/releases/tag/v9.2.1039"},{"type":"ADVISORY","url":"https://nvd.nist.gov/vuln/detail/CVE-2026-116538"},{"type":"ADVISORY","url":"https://www.vulncheck.com/advisories/htmlsanitizer-before-9.2.1039-xss-via-sanitizedom-body-and-html-attributes"},{"type":"FIX","url":"https://github.com/mganss/HtmlSanitizer/commit/96afbc818e64de7571ea17954a05d523e819c56f"},{"type":"FIX","url":"https://github.com/mganss/HtmlSanitizer/commit/ab626e7a4f2893f7e9ec0a72779ae19c5ec439a7"},{"type":"PACKAGE","url":"https://github.com/mganss/HtmlSanitizer"},{"type":"ARTICLE","url":"https://github.com/mganss/HtmlSanitizer/blob/v9.2.995/src/HtmlSanitizer/HtmlSanitizer.cs#L456-L465"},{"type":"ARTICLE","url":"https://github.com/mganss/HtmlSanitizer/blob/v9.2.995/src/HtmlSanitizer/HtmlSanitizer.cs#L555-L583"},{"type":"ARTICLE","url":"https://joshua.hu/htmlsanitizer-sanitizedom-body-html-attribute-bypass"}],"affected":[{"ranges":[{"type":"GIT","repo":"https://github.com/mganss/htmlsanitizer","events":[{"introduced":"0"},{"fixed":"0417018d81765e3e15126a65f5a49d71e55f0920"},{"fixed":"a71cbe31e9203b97a2a5204e5f017e0ad11c1c62"},{"fixed":"96afbc818e64de7571ea17954a05d523e819c56f"},{"fixed":"ab626e7a4f2893f7e9ec0a72779ae19c5ec439a7"}],"database_specific":{"extracted_events":[{"strategy":"StandardRange","range":[{"introduced":"0"},{"fixed":"9.2.1039"}],"source":"AFFECTED_FIELD"},{"range":[{"introduced":"10.0.0-beta"},{"fixed":"10.0.1037-beta"}],"source":"AFFECTED_FIELD","strategy":"StandardRange"},{"range":[{"fixed":"96afbc818e64de7571ea17954a05d523e819c56f"}],"source":"REFERENCES_COMMIT"},{"range":[{"fixed":"ab626e7a4f2893f7e9ec0a72779ae19c5ec439a7"}],"source":"REFERENCES_COMMIT"},{"original_tag":"v9.2.1039","range":[{"fixed":"0417018d81765e3e15126a65f5a49d71e55f0920"}],"source":"REFERENCES_TAG"},{"source":"REFERENCES_TAG","original_tag":"v10.0.1037-beta","range":[{"fixed":"a71cbe31e9203b97a2a5204e5f017e0ad11c1c62"}]}]}}],"versions":["v9.2.995","v9.1.982","v9.1.981","v9.1.974","v9.1.973","v9.0.892","v9.0.889","v9.0.886","v9.0.884","v9.0.881","v9.0.876","v9.0.873","v8.1.870","v8.0.865","v8.0.843","v8.0.838","v8.0.811","v8.0.795","v8.0.746","v8.0.744","v8.0.723","v8.0.718","v8.0.692","v8.0.645","v8.0.601","v7.1.542","v7.1.512","v7.1.509","v7.1.488","v7.1.475","v7.0.473","v7.0.470","v6.0.453","v6.0.441","v6.0.437","v6.0.430","v6.0.423","v6.0.409","v5.0.395","v5.0.392","v5.0.391","v5.0.388","v5.0.385","v5.0.382","v5.0.379","v5.0.376","v5.0.372","v5.0.371","v5.0.368","v5.0.367","v5.0.366","v5.0.365","v5.0.364","v5.0.363","v5.0.358","v5.0.355","v5.0.354","v5.0.343","v5.0.342","v5.0.332","v5.0.331","v5.0.328","v5.0.325","v5.0.322","v5.0.319","v5.0.316","v5.0.313","v5.0.310","v5.0.307","v5.0.304","v5.0.303","v5.0.298","v5.0.297","v5.0.296","v5.0.293","v5.0.292","v5.0.291","v5.0.290","v5.0.287","v5.0.283","v5.0.280","v5.0.277","v5.0.274","v5.0.272","v5.0.269","v5.0.266","v5.0.263","v5.0.260","v5.0.257","v5.0.250","v5.0.249","v5.0.248","v5.0.245","v5.0.244","v5.0.239","v5.0.236","v5.0.233","v4.0.230","v4.0.229","v4.0.228","v4.0.219","v4.0.217","v4.0.212","v4.0.211","v4.0.210","v4.0.209","v4.0.207","v4.0.205","v4.0.204","v4.0.201","v4.0.199","v4.0.193","v4.0.192","v4.0.191","v4.0.189","v4.0.188","v4.0.187","v4.0.186","v4.0.185","v4.0.183","v4.0.182","v4.0.181","v4.0.180","v4.0.179","v3.5.169-beta","v3.5.168-beta","v3.5.167-beta","v3.4.156","v3.4.152-beta","v3.3.148-beta","v3.3.147-beta","v3.3.146-beta","v3.3.145-beta","v3.3.144-beta","v3.3.143-beta","v3.3.142","v3.3.140-beta","v3.3.134-beta","v3.3.132-beta","v3.3.131-beta","v3.3.130-beta","v3.3.129-beta","v3.3.128-beta","v3.3.127-beta","v3.3.126-beta","v3.3.125-beta","v3.3.122-beta","v3.2.105","v3.2.103","v3.2.100","v3.1.98","v3.1.93","v3.1.91","v3.1.79","v3.1.76"],"database_specific":{"source":"https://storage.googleapis.com/cve-osv-conversion/osv-output/CVE-2026-116538.json"}}],"schema_version":"1.9.2","severity":[{"type":"CVSS_V4","score":"CVSS:4.0/AV:N/AC:L/AT:P/PR:N/UI:P/VC:N/VI:N/VA:N/SC:L/SI:L/SA:N"}]}