Vulnerability · Published Feb 4, 2026 · Assigned by GitHub_M

CVE-2026-25543HtmlSanitizer has a bypass via template tag

Medium 6.3

In plain English

A medium-severity security flaw in HtmlSanitizer from mganss. There are no confirmed reports of exploitation so far. The chance it is exploited in the next 30 days is estimated at 0.3% (higher than 20% of all known vulnerabilities). Fixed versions are available - upgrade the affected package.

Severity (CVSS 4.0)6.3Medium
Exploit odds (30 days)0.3%top 80.1% of all CVEs
Exploited in the wildNo reportsCISA SSVC: none
Attack toolingNoneno public tooling known

Official description

HtmlSanitizer is a .NET library for cleaning HTML fragments and documents from constructs that can lead to XSS attacks. Prior to versions 9.0.892 and 9.1.893-beta, if the template tag is allowed, its contents are not sanitized. The template tag is a special tag that does not usually render its contents, unless the shadowrootmode attribute is set to open or closed. This issue has been patched in versions 9.0.892 and 9.1.893-beta.

Affected packages & fixed versions

EcosystemPackageFixed inAdvisory
NuGethtmlsanitizer9.0.892GHSA-j92c-7v7g-gj3f
NuGethtmlsanitizer9.1.893-betaGHSA-j92c-7v7g-gj3f

Affected products (as reported)

VendorProductVersions
mganss HtmlSanitizer < 9.0.892< 9.1.893-beta

Weakness: CWE-116 · Vector: 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

References