Skip to content
OpenAdvisories
Medium · 6.3 CVE-2026-25543 EUVD-2026-5328GHSA-j92c-7v7g-gj3f

HtmlSanitizer has a bypass via template tag

Published Feb 4, 2026 · Updated Feb 5, 2026 · Assigned by GitHub_M

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 products

VendorProductAffectedFixed
mganss HtmlSanitizer < 9.0.892, < 9.1.893-beta —

Affected packages

EcosystemPackageAffectedFixedRecord
NuGet HtmlSanitizer < 9.0.892 9.0.892 GHSA-j92c-7v7g-gj3f
NuGet HtmlSanitizer >= 9.1.878-beta, < 9.1.893-beta 9.1.893-beta GHSA-j92c-7v7g-gj3f

References