Moderate severityNVD Advisory· Published Feb 4, 2026· Updated Feb 5, 2026
HtmlSanitizer has a bypass via template tag
CVE-2026-25543
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.
AI Insight
LLM-synthesized narrative grounded in this CVE's description and references.
Affected packages
Versions sourced from the GitHub Security Advisory.
| Package | Affected versions | Patched versions |
|---|---|---|
HtmlSanitizerNuGet | < 9.0.892 | 9.0.892 |
HtmlSanitizerNuGet | >= 9.1.878-beta, < 9.1.893-beta | 9.1.893-beta |
Affected products
2- Range: < 9.0.892
Patches
Vulnerability mechanics
References
8- github.com/advisories/GHSA-j92c-7v7g-gj3fghsaADVISORY
- nvd.nist.gov/vuln/detail/CVE-2026-25543ghsaADVISORY
- developer.mozilla.org/en-US/docs/Web/HTML/Reference/Elements/templateghsaWEB
- github.com/mganss/HtmlSanitizer/commit/0ac53dca30ddad963f2b243669a5066933d82b81ghsax_refsource_MISCWEB
- github.com/mganss/HtmlSanitizer/releases/tag/v9.0.892ghsaWEB
- github.com/mganss/HtmlSanitizer/security/advisories/GHSA-j92c-7v7g-gj3fghsax_refsource_CONFIRMWEB
- www.nuget.org/packages/HtmlSanitizer/9.0.892ghsax_refsource_MISCWEB
- www.nuget.org/packages/HtmlSanitizer/9.1.893-betaghsax_refsource_MISCWEB
News mentions
0No linked articles in our index yet.