CVE-2026-25543 Details
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.
A vulnerability exists in HtmlSanitizer, a .NET library, prior to versions 9.0.892 and 9.1.893-beta, allowing the contents of the 'template' tag to be unsanitized if the tag is permitted. The 'template' tag typically does not display its contents unless the 'shadowrootmode' attribute is set to 'open' or 'closed'. This oversight can be exploited to bypass sanitization and potentially execute cross-site scripting (XSS) attacks.
Users can update to HtmlSanitizer versions 9.0.892 or 9.1.893-beta, both of which address this vulnerability by ensuring proper sanitization of 'template' tag contents.
Metrics
CVSS 4.0 Severity and Vector Strings:
CVSS 3.x Severity and Vector Strings:
No data available for CVSS Version 2.0 on this CVE.
CISA-ADP
Assessed Feb 5, 2026References to Advisories, Solutions, and Tools
By selecting these links, you will be leaving this site. These are references gathered from the official CVE record and are not endorsed by Volerion.
| URL | Source(s) | Tag(s) |
|---|---|---|
| https://github.com/mganss/HtmlSanitizer/commit/0ac53dca30ddad963f2b243669a5066933d82b81 | [email protected] | Patch |
| https://github.com/mganss/HtmlSanitizer/security/advisories/GHSA-j92c-7v7g-gj3f | [email protected] | MitigationPatchVendor Advisory |
| https://www.nuget.org/packages/HtmlSanitizer/9.0.892 | [email protected] | ProductRelease Notes |
| https://www.nuget.org/packages/HtmlSanitizer/9.1.893-beta | [email protected] | ProductRelease Notes |
Weakness Enumeration
| CWE-ID | CWE Name | Source |
|---|---|---|
| CWE-79 | Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting') | [email protected] |
| CWE-116 | Improper Encoding or Escaping of Output | [email protected] |
Affected Products
| Product | Versions |
|---|---|
| htmlsanitizer project htmlsanitizer | < 9.0.892 >= 9.1.878, < 9.1.893 |
CPE
Remediation
| |
Change History
4 change records found show changes
| Date | Action | Recorded By |
|---|---|---|
| Jun 17, 2026 | CVE Modified | [email protected] |
| Jun 17, 2026 | CVE Modified | CISA-ADP |
| Feb 24, 2026 | Initial Analysis | [email protected] |
| Feb 4, 2026 | New CVE Received | [email protected] |