Every CVE Search/ Get API key

CVE-2020-26293

Possible XSS bypass if style tag is allowed

6.1 MediumFix available

HtmlSanitizer is a .NET library for cleaning HTML fragments and documents from constructs that can lead to XSS attacks. In HtmlSanitizer before version 5.0.372, there is a possible XSS bypass if style tag is allowed. If you have explicitly allowed the <style> tag, an attacker could craft HTML that includes script after passing through the sanitizer. The default settings disallow the <style> tag so there is no risk if you have not explicitly allowed the <style> tag. The problem has been fixed in version 5.0.372.

Attack profile

How easy it is to exploit

Attack vector
Network
Complexity
High
Privileges needed
None
User interaction
Required

What an attacker can affect

Confidentiality
None
Integrity
High
Availability
None

Exploit likelihood

1.01%Unchanged since Apr 14, 2021
90%50%10%1%

What each source reports

CVE List Score used 6.1

Possible XSS bypass if style tag is allowed

HtmlSanitizer is a .NET library for cleaning HTML fragments and documents from constructs that can lead to XSS attacks. In HtmlSanitizer before version 5.0.372, there is a possible XSS bypass if style tag is allowed. If you have explicitly allowed the <style> tag, an attacker could craft HTML that includes script after passing through the sanitizer. The default settings disallow the <style> tag so there is no risk if you have not explicitly allowed the <style> tag. The problem has been fixed in version 5.0.372.

Record
CVE-2020-26293
CVSS 3.1
6.1 MediumCVSS:3.1/AV:N/AC:H/PR:N/UI:R/S:C/C:N/I:H/A:N
Weakness
CWE-74
Updated
2026-11-02
EUVDEUVD-2021-0498 6.1

HtmlSanitizer is a .NET library for cleaning HTML fragments and documents from constructs that can lead to XSS attacks. In HtmlSanitizer before version 5.0.372, there is a possible XSS bypass if style tag is allowed. If you have explicitly allowed the <style> tag, an attacker could craft HTML that includes script after passing through the sanitizer. The default settings disallow the <style> tag so there is no risk if you have not explicitly allowed the <style> tag. The problem has been fixed in version 5.0.372.

Record
EUVD-2021-0498
CVSS 3.1
6.1 MediumCVSS:3.1/AV:N/AC:H/PR:N/UI:R/S:C/C:N/I:H/A:N
Updated
2026-11-03
GitHub AdvisoriesGHSA-8j9v-h2vp-2hhv 6.1

XSS in HtmlSanitizer

Impact

If you have explicitly allowed the <style> tag, an attacker could craft HTML that includes script after passing through the sanitizer. The default settings disallow the <style> tag so there is no risk if you have not explicitly allowed the <style> tag.

Patches

The problem has been fixed in version 5.0.372.

Workarounds

Remove the <style> tag from the set of allowed tags.

For more information

If you have any questions or comments about this advisory open an issue in https://github.com/mganss/HtmlSanitizer

Credits

This issue was discovered by Michal Bentkowski of Securitum.

Record
GHSA-8j9v-h2vp-2hhv
CVSS 3.1
6.1 MediumCVSS:3.1/AV:N/AC:H/PR:N/UI:R/S:C/C:N/I:H/A:N
Weakness
CWE-74, CWE-79
Updated
2026-11-02
NVD 6.1

HtmlSanitizer is a .NET library for cleaning HTML fragments and documents from constructs that can lead to XSS attacks. In HtmlSanitizer before version 5.0.372, there is a possible XSS bypass if style tag is allowed. If you have explicitly allowed the <style> tag, an attacker could craft HTML that includes script after passing through the sanitizer. The default settings disallow the <style> tag so there is no risk if you have not explicitly allowed the <style> tag. The problem has been fixed in version 5.0.372.

Record
CVE-2020-26293
CVSS 3.1
6.1 MediumCVSS:3.1/AV:N/AC:H/PR:N/UI:R/S:C/C:N/I:H/A:N
CVSS 3.1
6.1 MediumCVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:L/I:L/A:N
CVSS 2.0
4.3 MediumAV:N/AC:M/Au:N/C:N/I:P/A:N
Weakness
CWE-74, CWE-79
Updated
2026-11-02
OSV 6.1

HtmlSanitizer is a .NET library for cleaning HTML fragments and documents from constructs that can lead to XSS attacks. In HtmlSanitizer before version 5.0.372, there is a possible XSS bypass if style tag is allowed. If you have explicitly allowed the <style> tag, an attacker could craft HTML that includes script after passing through the sanitizer. The default settings disallow the <style> tag so there is no risk if you have not explicitly allowed the <style> tag. The problem has been fixed in version 5.0.372.

Record
CVE-2020-26293
CVSS 3.1
6.1 MediumCVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:L/I:L/A:N
Updated
2026-11-02
OSVGHSA-8j9v-h2vp-2hhv 6.1

XSS in HtmlSanitizer

Impact

If you have explicitly allowed the <style> tag, an attacker could craft HTML that includes script after passing through the sanitizer. The default settings disallow the <style> tag so there is no risk if you have not explicitly allowed the <style> tag.

Patches

The problem has been fixed in version 5.0.372.

Workarounds

Remove the <style> tag from the set of allowed tags.

For more information

If you have any questions or comments about this advisory open an issue in https://github.com/mganss/HtmlSanitizer

Credits

This issue was discovered by Michal Bentkowski of Securitum.

Record
GHSA-8j9v-h2vp-2hhv
CVSS 3.1
6.1 MediumCVSS:3.1/AV:N/AC:H/PR:N/UI:R/S:C/C:N/I:H/A:N
Weakness
CWE-74, CWE-79
Updated
2026-11-02

Affected products

Affected packages

Affected packages
PackageAffectedFixed
HtmlSanitizer
NuGet
before 5.0.372
5.0.372
HtmlSanitizer
NuGet
before 5.0.372, plus listed versions
1.0.4925.298151.0.4927.308731.1.5243.284481.1.5297.284031.1.5338.17998
Show 45 moreShow less
2.0.5449.205502.0.5548.249322.0.5595.221832.0.5595.303252.0.5623.304652.0.5735.242963.0.5781.31354-beta3.0.66-beta3.1.67-beta3.1.75-beta3.1.763.1.793.1.913.1.933.1.983.2.100-beta3.2.1033.2.1053.2.96-beta3.3.122-beta3.3.125-beta3.3.126-beta3.3.127-beta3.3.128-beta3.3.129-beta3.3.130-beta3.3.131-beta3.3.132-beta3.3.1423.3.143-beta3.3.144-beta3.3.145-beta3.3.146-beta3.3.147-beta3.3.148-beta3.4.152-beta3.4.1563.5.168-beta3.5.169-beta4.0.1794.0.1804.0.1814.0.1824.0.1834.0.185
5.0.372

History

History
RecordedChangedSources
aliasesEUVD
first indexedCVE List, GitHub Advisories, NVD, OSV

Dates are when Every CVE recorded each change. Upstream dates may differ.

In short

CVE-2020-26293 is a medium vulnerability (CVSS 6.1) in Htmlsanitizer Project Htmlsanitizer, published January 4, 2021. No source lists public exploit code. EPSS puts the chance of exploitation in the next 30 days at 1.01%, the 63rd percentile. Fixed in HtmlSanitizer 5.0.372.

References

This page doesn't list everything

Left out here: 23 versions. The JSON record has them.

MoveEnter Open