CVE-2026-25543
MEDIUM 6.3CVSS 4.0HtmlSanitizer has a bypass via template tag
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.
- Published
- 4 Feb 2026
- Last modified
- 17 Jun 2026
- Assigned by
- security-advisories@github.com
- NVD status
- Analyzed
- Weakness
- CWE-116CWE-79
- Also known as
- GHSA-j92c-7v7g-gj3f
- Sources
- NVDJSONOSV GHSA-j92c-7v7g-gj3fJSON
Scores
| Source | Scored by | Version | Score | Vector / decision |
|---|---|---|---|---|
| NVD | security-advisories@github.com (Secondary) | CVSS 4.0 | MEDIUM 6.3 | CVSS:4.0/AV:N/AC:L/AT:P/PR:N/UI:N/VC:N/VI:N/VA:N/SC:L/SI:L/SA:N/E:X/CR:X/IR:X/AR:X/MAV:X/MAC:X/MAT:X/MPR:X/MUI:X/MVC:X/MVI:X/MVA:X/MSC:X/MSI:X/MSA:X/S:X/AU:X/R:X/V:X/RE:X/U:X |
| OSV | GitHub | CVSS 4.0 | CVSS:4.0/AV:N/AC:L/AT:P/PR:N/UI:N/VC:N/VI:N/VA:N/SC:L/SI:L/SA:N | |
| NVD | nvd@nist.gov (Primary) | CVSS 3.1 | MEDIUM 6.1 | CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:L/I:L/A:N |
Affected
| Source | Vendor / ecosystem | Product / package | Affected versions | Fixed in |
|---|---|---|---|---|
| NVD | htmlsanitizer_project | htmlsanitizercpe:2.3:a:htmlsanitizer_project:htmlsanitizer:*:*:*:*:*:*:*:* |
< 9.0.892 | 9.0.892 |
| NVD | htmlsanitizer_project | htmlsanitizercpe:2.3:a:htmlsanitizer_project:htmlsanitizer:*:*:*:*:*:*:*:* |
>= 9.1.878, < 9.1.893 | 9.1.893 |
| OSV | NuGet | HtmlSanitizer | < 9.0.892 | 9.0.892 |
| OSV | NuGet | HtmlSanitizer | >= 9.1.878-beta, < 9.1.893-beta | 9.1.893-beta |
References
- https://github.com/mganss/HtmlSanitizer/commit/0ac53dca30ddad963f2b243669a5066933d82b81 · Patch, WEB
- https://github.com/mganss/HtmlSanitizer/security/advisories/GHSA-j92c-7v7g-gj3f · Mitigation, Patch, Vendor Advisory, WEB
- https://www.nuget.org/packages/HtmlSanitizer/9.0.892 · Product, Release Notes, WEB
- https://www.nuget.org/packages/HtmlSanitizer/9.1.893-beta · Product, Release Notes, WEB
- https://nvd.nist.gov/vuln/detail/CVE-2026-25543 · ADVISORY
- https://developer.mozilla.org/en-US/docs/Web/HTML/Reference/Elements/template · WEB
- https://github.com/mganss/HtmlSanitizer · PACKAGE
- https://github.com/mganss/HtmlSanitizer/releases/tag/v9.0.892 · WEB
History
- 25 Nov 2026 21:01 UTC · NVD: first stored (published 4 Feb 2026)
- 25 Nov 2026 20:13 UTC · OSV: first stored (published 3 Feb 2026)