HtmlSanitizer before 9.2.1039 XSS via SanitizeDom Body and HTML Attributes
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.
- Products
- HtmlSanitizer
- Affected versions
- Not specified
- Fixed versions
- Not specified
- CVEs
- CVE-2026-116538
- Confirmed fixed CVEs
- Not specified
- Updated in this feed
- 30 Oct 2026, 11:18 UTC · Revision 1
Source evidence
HtmlSanitizer before 9.2.1039 XSS via SanitizeDom Body and HTML Attributes
core-cve · Original sourcePublished 26 Oct 2026, 14:59 UTC
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.
cve:CVE-2026-116538
HtmlSanitizer
Fixed versions: Not specified
Complete source record
{
"id": "d81f75ca6634403eb8f70c125289d59b882694f16a52c2945447accf743d59e4",
"url": "https://www.cve.org/CVERecord?id=CVE-2026-116538",
"method": "structured",
"payload": {
"kind": "advisory",
"title": "HtmlSanitizer before 9.2.1039 XSS via SanitizeDom Body and HTML Attributes",
"summary": "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.",
"evidence": "cve:CVE-2026-116538",
"products": [
{
"name": {
"value": "HtmlSanitizer",
"evidence": "/containers/cna/affected/0/product"
},
"prerequisites": [],
"fixed_versions": [],
"affected_versions": []
}
],
"severity": "medium",
"structured": {
"id": "CVE-2026-116538",
"aliases": [
"CVE-2026-116538"
],
"metrics": [
{
"format": "CVSS",
"cvssV4_0": {
"version": "4.0",
"baseScore": 2.3,
"attackVector": "NETWORK",
"baseSeverity": "LOW",
"vectorString": "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",
"userInteraction": "PASSIVE",
"attackComplexity": "LOW",
"attackRequirements": "PRESENT",
"privilegesRequired": "NONE",
"subIntegrityImpact": "LOW",
"vulnIntegrityImpact": "NONE",
"subAvailabilityImpact": "NONE",
"vulnAvailabilityImpact": "NONE",
"subConfidentialityImpact": "LOW",
"vulnConfidentialityImpact": "NONE"
}
},
{
"format": "CVSS",
"cvssV3_1": {
"scope": "CHANGED",
"version": "3.1",
"baseScore": 4.7,
"attackVector": "NETWORK",
"baseSeverity": "MEDIUM",
"vectorString": "CVSS:3.1/AV:N/AC:H/PR:N/UI:R/S:C/C:L/I:L/A:N",
"integrityImpact": "LOW",
"userInteraction": "REQUIRED",
"attackComplexity": "HIGH",
"availabilityImpact": "NONE",
"privilegesRequired": "NONE",
"confidentialityImpact": "LOW"
}
}
],
"affected": [
{
"repo": "https://github.com/mganss/HtmlSanitizer",
"vendor": "mganss",
"product": "HtmlSanitizer",
"versions": [
{
"status": "affected",
"version": "0",
"lessThan": "9.2.1039",
"versionType": "semver"
},
{
"status": "affected",
"version": "10.0.0-beta",
"lessThan": "10.0.1037-beta",
"versionType": "semver"
}
],
"packageURL": "pkg:nuget/HtmlSanitizer",
"packageName": "HtmlSanitizer",
"collectionURL": "https://www.nuget.org/packages/HtmlSanitizer",
"defaultStatus": "unaffected"
}
],
"modified": "2026-10-26T14:59:38.815Z",
"provider": "cve",
"references": [
"https://github.com/mganss/HtmlSanitizer/commit/96afbc818e64de7571ea17954a05d523e819c56f",
"https://github.com/mganss/HtmlSanitizer/commit/ab626e7a4f2893f7e9ec0a72779ae19c5ec439a7",
"https://github.com/mganss/HtmlSanitizer/blob/v9.2.995/src/HtmlSanitizer/HtmlSanitizer.cs#L456-L465",
"https://github.com/mganss/HtmlSanitizer/blob/v9.2.995/src/HtmlSanitizer/HtmlSanitizer.cs#L555-L583",
"https://joshua.hu/htmlsanitizer-sanitizedom-body-html-attribute-bypass",
"https://github.com/mganss/HtmlSanitizer/releases/tag/v9.2.1039",
"https://github.com/mganss/HtmlSanitizer/releases/tag/v10.0.1037-beta",
"https://github.com/mganss/HtmlSanitizer",
"https://www.vulncheck.com/advisories/htmlsanitizer-before-9.2.1039-xss-via-sanitizedom-body-and-html-attributes"
],
"provider_metadata": {
"cna": {
"orgId": "83251b91-4cc7-4094-a5c7-464a1b83ea10",
"shortName": "VulnCheck",
"dateUpdated": "2026-10-26T14:59:38.815Z"
}
}
},
"related_cves": [
{
"value": "CVE-2026-116538",
"evidence": "/cveMetadata/cveId"
}
],
"security_relevant": true,
"severity_evidence": "/containers/cna/metrics"
},
"source_id": "core-cve",
"document_id": 314037,
"published_at": "2026-10-26T14:59:38.815+00:00"
}