HtmlSanitizer has a bypass via template tag
CVE-2026-25543Published 4 Feb 2026, 21:45 UTC
Real-world risk
1.1/ 10Low
Routine
If the vulnerable configuration applies to you: 2.6
PreliminaryFrom the CVSS vector only · confidence low
CVSS
6.3
scored by the vendor (CNA), CVSS 4.0
In plain words
No plain-language summary yet. The original description is below.
Original description (from GitHub_M)
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.
Am I affected?
| Product | Affected versions (from the sources) | Fixed in |
|---|---|---|
| HtmlSanitizerNiche | < 9.0.892; < 9.1.893-beta | 9.0.892, 9.1.893-beta |
What to do
Update to a fixed version: 9.0.892, 9.1.893-beta.
Why this score
| Factor | Value | Evidence | × |
|---|---|---|---|
| Impact | MinorReflected XSS, CSRF with low effect, open redirect, minor leak | From the CVSS vector | 0.30 |
| Attacker position | InternetAnyone on the Internet can reach a typical deployment | From the CVSS vector | 1.00 |
| Privileges needed | NoneNo account | From the CVSS vector | 1.00 |
| Victim interaction | NoneNothing | From the CVSS vector | 1.00 |
| Configuration | UncommonNeeds a non-default feature that a minority enables | From the CVSS vector | 0.45 |
| Reliability | ReliableDeterministic: injection, logic bug, path traversal | From the CVSS vector | 1.00 |
Threat level T1: Nothing known (× 0.85)
The default for a new disclosure
EPSS 0.3% chance of exploitation in 30 days (percentile 21), as of 2026-12-04.
The arithmetic
- Prerequisites multiplied together0.450
- Threat T1: Nothing known0.850
- 10 × impact 0.3 × prerequisites 0.45 × threat 0.851.147
- Rounded to one decimal between 0.1 and 101.1
Exploitation and evidence timeline
- 4 Feb 2026 Published
- 3 Dec 2026 Risk 1.1 (cvss fallback)
Weakness
CWE-116
References
- https://github.com/mganss/HtmlSanitizer/security/advisories/GHSA-j92c-7v7g-gj3fvendor-advisory
- https://github.com/mganss/HtmlSanitizer/commit/0ac53dca30ddad963f2b243669a5066933d82b81misc
- https://www.nuget.org/packages/HtmlSanitizer/9.0.892misc
- https://www.nuget.org/packages/HtmlSanitizer/9.1.893-betamisc
- CVE-2026-25543 on CVE.org