CVE-2020-26293 json
Possible XSS bypass if style tag is allowed
published 5y ago modified last mo. also GHSA-8j9v-h2vp-2hhv , EUVD-2021-0498
- cvss
- 6.1
- version 3.1, CNA
- cisa kev
- Not listed
- not in CISA's catalog
- epss
- 1.0%
- EPSS 1.0% chance of exploitation in 30 days, percentile 63%
- public exploits
- 0
- none known
Summary
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.
Patch / fix
- nuget HtmlSanitizer 5.0.372
- htmlsanitizer_project htmlsanitizer 5.0.372
Is CVE-2020-26293 in your dependencies? Fencer shows which of your repositories are affected as soon as an advisory lands, and opens the fix as a pull request.
Check with FencerExploit prediction
1.01% chance of exploitation in the next 30 days, higher than 63% of all scored CVEs (FIRST EPSS, 2026-11-09).
CVSS scores
| assigned by | version | score | vector |
|---|---|---|---|
| CNA | 3.1 | 6.1 | CVSS:3.1/AV:N/AC:H/PR:N/UI:R/S:C/C:N/I:H/A:N |
| NVD | 3.1 | 6.1 | CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:L/I:L/A:N |
| NVD | 2.0 | 4.3 | AV:N/AC:M/Au:N/C:N/I:P/A:N |
| GitHub | 3.1 | 6.1 | CVSS:3.1/AV:N/AC:H/PR:N/UI:R/S:C/C:N/I:H/A:N |
Affected packages
| ecosystem | package | affected | fixed in |
|---|---|---|---|
| nuget | HtmlSanitizer | <5.0.372 |
5.0.372 |
Affected products
- mganss HtmlSanitizer
Classification
References
-
github.com
/mganss/HtmlSanitizer/commit/a3a7602a44d4155d51ec0fbbedc2a49e9c7e2eb8
web, patch, third-party-advisory
-
github.com
/mganss/HtmlSanitizer/security/advisories/GHSA-8j9v-h2vp-2hhv
web, third-party-advisory
-
nuget.org
/packages/HtmlSanitizer/
product, third-party-advisory
-
github.com
/mganss/HtmlSanitizer/releases/tag/v5.0.372
web, release-notes, third-party-advisory
-
nvd.nist.gov
/vuln/detail/CVE-2020-26293
advisory
-
nuget.org
/packages/HtmlSanitizer
web
Sources
- CVE List CVE-2020-26293
- GitHub Advisory GHSA-8j9v-h2vp-2hhv
- NVD CVE-2020-26293
Fencer Intel keeps one entry per vulnerability: the CVE id wins, then GHSA, and records that alias each other are merged, except that two CVEs always keep separate entries. The same data is available as JSON.