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

Published Oct 26, 2026
·
Updated

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.

Affected Software

1 affected component
mganss HtmlSanitizer<9.2.1039, <10.0.1037-beta

Remediation

Recommended actions to resolve this vulnerability, in priority order.

  1. Upgrade

    Upgrade HtmlSanitizer to a version that resolves this vulnerability.

    Fixed in 9.2.1039
  2. Upgrade

    Upgrade HtmlSanitizer to a version that resolves this vulnerability.

    Fixed in 10.0.1037-beta

Event History

Oct 26, 2026
CVE Published
via MITRE·02:59 PM
Data Sourced
via MITRE·02:59 PM
DescriptionSeverityWeakness

Frequently Asked Questions

1

Which deployments are exposed?

Deployments using HtmlSanitizer versions before 9.2.1039, or 10.0 prereleases before 10.0.1037-beta, are affected when they use SanitizeDom(string) and render serialized document or body outer HTML.

2

What must an attacker be able to do to exploit this?

An attacker must be able to supply HTML that reaches SanitizeDom(string). The supplied input can include a second html or body element with an event-handler attribute such as onload.

3

How can I determine whether an application is affected?

Review the installed HtmlSanitizer version and identify uses of SanitizeDom(string). Applications that subsequently serialize and render document or body outer HTML should be treated as affected on vulnerable versions.

4

What version should be used to remediate the issue?

Upgrade to HtmlSanitizer 9.2.1039 or later. For the 10.0 prerelease line, use 10.0.1037-beta or later.

Contact

SecAlerts Pty Ltd.
132 Wickham Terrace
Fortitude Valley,
QLD 4006, Australia
info@secalerts.co
By using SecAlerts services, you agree to our services end-user license agreement. This website is safeguarded by reCAPTCHA and governed by the Google Privacy Policy and Terms of Service. All names, logos, and brands of products are owned by their respective owners, and any usage of these names, logos, and brands for identification purposes only does not imply endorsement. If you possess any content that requires removal, please get in touch with us.
© 2026 SecAlerts Pty Ltd.
ABN: 70 645 966 203, ACN: 645 966 203