CVE-2026-25543
Unknown Unknown - Not Provided
XSS Vulnerability in HtmlSanitizer Template Tag Content

Publication date: 2026-02-04

Last updated on: 2026-02-24

Assigner: GitHub, Inc.

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.
CVSS Scores
EPSS Scores
Probability:
Percentile:
Meta Information
Published
2026-02-04
Last Modified
2026-02-24
Generated
2026-05-07
AI Q&A
2026-02-05
EPSS Evaluated
2026-05-05
NVD
Affected Vendors & Products
Showing 2 associated CPEs
Vendor Product Version / Range
htmlsanitizer_project htmlsanitizer to 9.0.892 (exc)
htmlsanitizer_project htmlsanitizer From 9.1.878 (inc) to 9.1.893 (exc)
Helpful Resources
Exploitability
CWE
CWE Icon
KEV
KEV Icon
CWE ID Description
CWE-79 The product does not neutralize or incorrectly neutralizes user-controllable input before it is placed in output that is used as a web page that is served to other users.
CWE-116 The product prepares a structured message for communication with another component, but encoding or escaping of the data is either missing or done incorrectly. As a result, the intended structure of the message is not preserved.
Attack-Flow Graph
AI Powered Q&A
Can you explain this vulnerability to me?

This vulnerability exists in the HtmlSanitizer .NET library, which is used to clean HTML fragments and documents to prevent cross-site scripting (XSS) attacks.

Prior to versions 9.0.892 and 9.1.893-beta, if the HTML template tag is allowed, the contents inside this tag are not sanitized.

The template tag is special because it does not usually render its contents unless the shadowrootmode attribute is set to open or closed.

Because the contents inside the template tag were not sanitized, malicious scripts could be embedded and potentially executed, leading to XSS attacks.

This issue has been fixed in versions 9.0.892 and 9.1.893-beta of HtmlSanitizer.


How can this vulnerability impact me? :

This vulnerability can allow attackers to inject malicious scripts into HTML content that is assumed to be safe.

If an application uses an affected version of HtmlSanitizer and allows the template tag, attackers could exploit this to perform cross-site scripting (XSS) attacks.

Such XSS attacks can lead to unauthorized actions on behalf of users, theft of sensitive information, session hijacking, or other malicious activities.


How does this vulnerability affect compliance with common standards and regulations (like GDPR, HIPAA)?:

I don't know


How can this vulnerability be detected on my network or system? Can you suggest some commands?

I don't know


What immediate steps should I take to mitigate this vulnerability?

To mitigate this vulnerability, update HtmlSanitizer to version 9.0.892 or later, or 9.1.893-beta or later, where the issue has been patched.


Ask Our AI Assistant
Need more information? Ask your question to get an AI reply (Powered by our expertise)
0/70
EPSS Chart