HtmlSanitizer before 9.2.1039 XSS via SanitizeDom Body and HTML Attributes
CVE-2026-116538Published 26 Oct 2026, 14:59 UTC
Real-world risk
0.8/ 10Low
Routine
If the vulnerable configuration applies to you: 1.8
PreliminaryFrom the CVSS vector only · confidence low
CVSS
2.3
scored by the vendor (CNA), CVSS 4.0
In plain words
No plain-language summary yet. The original description is below.
Original description (from VulnCheck)
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.
Am I affected?
| Product | Affected versions (from the sources) | Fixed in |
|---|---|---|
| HtmlSanitizerNiche | < 9.2.1039; >= 10.0.0-beta, < 10.0.1037-beta | 9.2.1039, 10.0.1037-beta |
What to do
Update to a fixed version: 9.2.1039, 10.0.1037-beta.
Why this score
| Factor | Value | Evidence | × |
|---|---|---|---|
| Impact | MinorReflected XSS, CSRF with low effect, open redirect, minor leak | From the CVSS vector | 0.30 |
| Attacker position | InternetAnyone on the Internet can reach a typical deployment | From the CVSS vector | 1.00 |
| Privileges needed | NoneNo account | From the CVSS vector | 1.00 |
| Victim interaction | RoutineA normal action: open a file, visit a page, click a link | From the CVSS vector | 0.70 |
| Configuration | UncommonNeeds a non-default feature that a minority enables | From the CVSS vector | 0.45 |
| Reliability | ReliableDeterministic: injection, logic bug, path traversal | From the CVSS vector | 1.00 |
Threat level T1: Nothing known (× 0.85)
The default for a new disclosure
EPSS 0.4% chance of exploitation in 30 days (percentile 31), as of 2026-12-04.
The arithmetic
- Prerequisites multiplied together0.315
- Threat T1: Nothing known0.850
- 10 × impact 0.3 × prerequisites 0.315 × threat 0.850.803
- Rounded to one decimal between 0.1 and 100.8
Exploitation and evidence timeline
- 26 Oct 2026 Published
- 3 Dec 2026 Risk 0.8 (cvss fallback)
Weakness
CWE-79
References
- https://github.com/mganss/HtmlSanitizer/commit/96afbc818e64de7571ea17954a05d523e819c56fpatch
- https://github.com/mganss/HtmlSanitizer/commit/ab626e7a4f2893f7e9ec0a72779ae19c5ec439a7patch
- https://github.com/mganss/HtmlSanitizer/blob/v9.2.995/src/HtmlSanitizer/HtmlSanitizer.cs#L456-L465technical-description
- https://joshua.hu/htmlsanitizer-sanitizedom-body-html-attribute-bypasstechnical-description
- https://github.com/mganss/HtmlSanitizer/releases/tag/v9.2.1039release-notes
- https://github.com/mganss/HtmlSanitizer/releases/tag/v10.0.1037-betarelease-notes
- https://github.com/mganss/HtmlSanitizerproduct
- https://www.vulncheck.com/advisories/htmlsanitizer-before-9.2.1039-xss-via-sanitizedom-body-and-html-attributesthird-party-advisory
- CVE-2026-116538 on CVE.org