Skip to main content
VulnerabilityPublished

CVE-2026-25543: mganss HtmlSanitizer · Improper Encoding or Escaping of Output

Affects mganss HtmlSanitizerSource CVE Database V5

0

Not known to be exploited · CVSS 6.3 Medium : upgrade to 9.1.893-beta or 9.0.892 when convenient.

Data as of 26 Oct 2026, 11:42 UTC

CVSS 4.0 base score
6.3Medium
How severe the flaw is on the 0–10 CVSS scale.
EPSS
0.2% chance of exploitation in 30 days – higher than 20% of CVEsExploit Prediction Scoring System: the likelihood attackers will use this flaw soon.
Patch
Available – fixed in 9.1.893-beta, 9.0.892
CVSS:4.0/AV:N/AC:L/AT:P/PR:N/UI:N/VC:N/VI:N/VA:N/SC:L/SI:L/SA:N

Exploitation evidence

  1. Disclosed: evidence found.

    CVE published 4 Feb 2026

  2. Detectable: no evidence on record.

    No public nuclei template indexed

  3. Weaponised: no evidence on record.

    No public exploit code indexed in Metasploit or Exploit-DB

  4. Exploited in the wild: no evidence on record.

    Not in CISA KEV and no source reports exploitation

  5. Observed by OffSeq Mirage: no evidence on record.

    No attack traffic recorded by OffSeq Mirage sensors

A missing step is not evidence of safety. Sources: cve.org (opens in a new tab), the Metasploit, Exploit-DB and nuclei-templates index as of 26 Oct 2026.

What to do

Upgrade HtmlSanitizer to 9.1.893-beta or 9.0.892; htmlsanitizer to 9.0.892.

Affected software

ProductAffectedFixed in
mganssHtmlSanitizerAffected
  • <9.1.893-beta
Fixed in
  • 9.1.893-beta
mganssHtmlSanitizerAffected
  • <9.0.892
Fixed in
  • 9.0.892
NuGethtmlsanitizerpkg:nuget/htmlsanitizerOther threatsAffected
  • <9.0.892
  • =9.1.893-beta
Fixed in
  • 9.0.892

Check your own hosts for these packages with threat-finder (opens in a new tab), our free open-source scanner.

AI-suggested

  1. Upgrade all instances of mganss HtmlSanitizer to version 9.0.892 or later (including 9.1.893-beta) to apply the official patch addressing this vulnerability.
  2. Audit existing codebases to identify usage of the <template> tag within sanitized HTML and assess whether it is necessary to allow this tag.
  3. If the <template> tag is required, implement additional custom sanitization or validation to ensure its contents do not contain executable scripts or malicious payloads.
  4. Employ Content Security Policy (CSP) headers to restrict script execution and reduce the impact of potential XSS attacks.
  5. Conduct thorough security testing, including static analysis and dynamic scanning, focusing on HTML sanitization and injection points.
  6. Educate developers on secure handling of HTML content and the risks associated with improper sanitization of special tags like <template>. 7.

Description

CVE-2026-25543 is a medium severity vulnerability in the mganss HtmlSanitizer . NET library, affecting versions prior to 9.0.892 and 9.1.893-beta. The flaw arises from improper encoding or escaping of output (CWE-116) when the HTML template tag is allowed, as its contents are not sanitized unless the shadowrootmode attribute is set. This can lead to cross-site scripting (XSS) attacks if malicious content is injected within template tags. The vulnerability does not require authentication or user interaction and can be exploited remotely over the network. Although no known exploits are currently reported in the wild, the issue has been patched in the specified versions.

References

Community reviews

Loading reviews…