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

- Severity: Medium 6.3 (CVSS:4.0, scored by GitHub_M) `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`
- Known to be exploited: not in CISA's catalogue, which lists only what CISA has confirmed
- Likelihood of exploitation in the next 30 days (EPSS): 0.27%, higher than 21% of CVEs (2026-12-01)
- Published: 2026-02-03T19:22:06.000Z
- Modified: 2026-06-17T10:24:49.647Z
- Also known as: GHSA-j92c-7v7g-gj3f
- Weaknesses: CWE-79, CWE-116
- SSVC (CISA-ADP): exploitation none, automatable yes, technical impact partial
- Assigned by: GitHub_M

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

(As written by CVE List.)

## Affected

- mganss HtmlSanitizer: < 9.0.892; < 9.1.893-beta
- HtmlSanitizer (NuGet): before 9.0.892; from 9.1.878-beta before 9.1.893-beta
- htmlsanitizer_project htmlsanitizer: before 9.0.892; from 9.1.878 before 9.1.893

## Every score

- GitHub_M: CVSS:4.0 6.3 Medium `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`
- GitHub: CVSS:4.0 Medium `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: CVSS:3.1 6.1 Medium `CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:L/I:L/A:N`

## References

- <https://github.com/mganss/HtmlSanitizer/security/advisories/GHSA-j92c-7v7g-gj3f> (mitigation, patch, vendor-advisory, web)
- <https://github.com/mganss/HtmlSanitizer/commit/0ac53dca30ddad963f2b243669a5066933d82b81> (patch, 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)

## Sources

- CVE List: [CVE-2026-25543](https://www.cve.org/CVERecord?id=CVE-2026-25543), CVE Terms of Use, modified 2026-02-05
- GitHub Advisory Database: [GHSA-j92c-7v7g-gj3f](https://github.com/advisories/GHSA-j92c-7v7g-gj3f), CC-BY-4.0, modified 2026-02-28
- NVD: [CVE-2026-25543](https://nvd.nist.gov/vuln/detail/CVE-2026-25543), Public domain, modified 2026-06-17

---

Page: https://cve.day/CVE-2026-25543 · Whole record: https://cve.day/CVE-2026-25543.json · Rebuilt by cve.day 2026-11-25T22:59:13.514Z
