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.
Published: 2026-10-26
Score: 2.3 Low
EPSS: n/a
KEV: No
Impact: Cross‑Site Scripting
Action: Patch Now
AI Analysis

Impact

The vulnerability in HtmlSanitizer allows an attacker to insert malicious event handler attributes on nested <body> or <html> tags that are not stripped during the SanitizeDom process. When such sanitized content is rendered or its outer HTML is serialized, the injected handlers execute arbitrary JavaScript in the victim’s browser. This enables script execution within the context of the site, which can lead to session hijacking, credential theft, or defacement. The flaw is a classic injection weakness (CWE‑79) and is commonly used for XSS attacks in web applications that render user‑supplied markup.

Affected Systems

The flaw exists in the mganss:HtmlSanitizer library for versions prior to 9.2.1039 and for 10.0 prereleases before 10.0.1037‑beta. Any project that references these releases and uses the SanitizeDom method to wrap user content is susceptible.

Risk and Exploitability

The CVSS base score of 2.3 reflects a low‑severity risk under the current scoring model, but the exploit is trivial once the affected method is used. Because the attack vector relies on providing crafted HTML to the sanitizer, any application that accepts unchecked user input and serializes it back to the browser is at risk. EPSS data is not available, and the vulnerability is not listed in CISA KEV. The likely attack path is an application receiving malicious markup, passing it through SanitizeDom, and rendering the result, at which point the injected event handlers fire in the victim’s browser.

Generated by OpenCVE AI on October 26, 2026 at 16:23 UTC.

Remediation

No solution or workaround provided in the CVE record.

OpenCVE Recommended Actions

  • Upgrade HtmlSanitizer to version 9.2.1039 or later, or to 10.0.1037‑beta or newer releases
  • Ensure that no additional <body> or <html> tags are nested in user content before sanitization, and validate or strip any attributes from these tags
  • If immediate version upgrade is not possible, customize the sanitizer or apply a secondary sanitization pass that explicitly removes attributes from <body> and <html> elements

Generated by OpenCVE AI on October 26, 2026 at 16:23 UTC.

Tracking

Sign in to view the affected projects.

Advisories

No advisories yet.

History

Mon, 26 Oct 2026 20:30:00 +0000

Type Values Removed Values Added
First Time appeared Mganss
Mganss htmlsanitizer
Vendors & Products Mganss
Mganss htmlsanitizer

Mon, 26 Oct 2026 15:30:00 +0000

Type Values Removed Values Added
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.
Title HtmlSanitizer before 9.2.1039 XSS via SanitizeDom Body and HTML Attributes
First Time appeared Htmlsanitizer Project
Htmlsanitizer Project htmlsanitizer
Weaknesses CWE-79
CPEs cpe:2.3:a:htmlsanitizer_project:htmlsanitizer:*:*:*:*:*:*:*:*
Vendors & Products Htmlsanitizer Project
Htmlsanitizer Project htmlsanitizer
References
Metrics cvssV3_1

{'score': 4.7, 'vector': 'CVSS:3.1/AV:N/AC:H/PR:N/UI:R/S:C/C:L/I:L/A:N'}

cvssV4_0

{'score': 2.3, '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'}


Subscriptions

Htmlsanitizer Project Htmlsanitizer
Mganss Htmlsanitizer
cve-icon MITRE

Status: PUBLISHED

Assigner: VulnCheck

Published:

Updated: 2026-10-26T14:59:38.815Z

Reserved: 2026-10-26T14:30:56.846Z

Link: CVE-2026-116538

cve-icon Vulnrichment

No data.

cve-icon NVD

Status : Awaiting Analysis

Published: 2026-10-26T16:17:19.030

Modified: 2026-10-26T18:39:42.503

Link: CVE-2026-116538

cve-icon Redhat

No data.

cve-icon OpenCVE Enrichment

Updated: 2026-10-26T20:15:14Z

Weaknesses
  • CWE-79

    Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting')