HtmlSanitizer has a bypass via template tag
Key facts
- Attack vector
- Network
- Privileges required
- None
- User interaction
- None
- Attack complexity
- Low
- Attack requirements
- Present
- Impact type
- Cross-site scripting
- Confidentiality · integrity · availability
- None · None · None
- Fix status
- Fixed
Attack profile from CVSS 4.0 · CNA. Fix status from CNA and GitHub. Impact type from CWE-79.
Summary
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.
Why it matters now
SSVC decision points
CISA ADP · SSVC 2.0.3
- Exploitation
- None
- Automatable
- Yes
- Technical impact
- Partial
The decision (Track, Attend, Act) also depends on your mission and well-being impact; see CISA's SSVC guide.
Affected products
| Vendor | Product | Affected versions | Fixed in | Status | Source |
|---|---|---|---|---|---|
| mganss | HtmlSanitizer | before 9.0.892; before 9.1.893-beta | 9.0.892, 9.1.893-beta | Patch available | CNA |
| — | HtmlSanitizer (NuGet) | before 9.0.892 | 9.0.892 | Patch available | GHSA-j92c-7v7g-gj3f |
| — | HtmlSanitizer (NuGet) | 9.1.878-beta to before 9.1.893-beta | 9.1.893-beta | Patch available | GHSA-j92c-7v7g-gj3f |
- HtmlSanitizer Vendormganss Affected before 9.0.892; before 9.1.893-beta Fixed in 9.0.892, 9.1.893-beta Patch available CNA
- HtmlSanitizer (NuGet) Vendor— Affected before 9.0.892 Fixed in 9.0.892 Patch available GHSA-j92c-7v7g-gj3f
- HtmlSanitizer (NuGet) Vendor— Affected 9.1.878-beta to before 9.1.893-beta Fixed in 9.1.893-beta Patch available GHSA-j92c-7v7g-gj3f
Remediation
- Fix · CNA HtmlSanitizer (mganss) Fixed in 9.0.892, 9.1.893-beta
- Fix · GHSA-j92c-7v7g-gj3f HtmlSanitizer (NuGet) Fixed in 9.0.892 Advisory →
- Fix · GHSA-j92c-7v7g-gj3f HtmlSanitizer (NuGet) Fixed in 9.1.893-beta Advisory →
Timeline
- 2026-10-02 Threatist record created from CVE-2026-25543
- 2026-10-03 Alias added: GHSA-j92c-7v7g-gj3f
References
Patch 2
More mganss Htmlsanitizer vulnerabilities
- TI-2020-16114 Possible XSS bypass if style tag is allowed CVSS 3.1MEDIUM 6.1
- TI-2023-23896 HtmlSanitizer vulnerable to Cross-site Scripting in Foreign Content CVSS 3.1MEDIUM 6.1
Sources
- CVE-2026-25543 · CVE Program
- CVE-2026-25543 · NVD
- FIRST EPSS
- GHSA-j92c-7v7g-gj3f · GitHub Advisory Database · CC BY 4.0
This product uses the NVD API but is not endorsed or certified by the NVD. Sources and licences