{"id":"CVE-2020-26293","published":"2021-01-04T18:20:14Z","modified":"2024-08-04T15:56:03Z","title":"Possible XSS bypass if style tag is allowed","vendor":"mganss","product":"HtmlSanitizer","tier":"tail","description":{"text":"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.","provenance":"source","from":"CVE.org"},"cvss":{"score":6.1,"severity":"MEDIUM","version":"3.1","vector":"CVSS:3.1/AV:N/AC:H/PR:N/UI:R/S:C/C:N/I:H/A:N","provenance":"source","from":"CVE.org CNA"},"epss":{"score":0.0101,"percentile":0.63936,"provenance":"source"},"cwes":[{"id":"CWE-74","name":"Improper Neutralization of Special Elements in Output Used by a Downstream Component"}],"references":[{"url":"https://github.com/mganss/HtmlSanitizer/security/advisories/GHSA-8j9v-h2vp-2hhv","tags":["x_refsource_CONFIRM"]},{"url":"https://www.nuget.org/packages/HtmlSanitizer/","tags":["x_refsource_MISC"]},{"url":"https://github.com/mganss/HtmlSanitizer/releases/tag/v5.0.372","tags":["x_refsource_MISC"]},{"url":"https://github.com/mganss/HtmlSanitizer/commit/a3a7602a44d4155d51ec0fbbedc2a49e9c7e2eb8","tags":["x_refsource_MISC"]}],"priority":{"score":17.1,"factors":[{"name":"EPSS percentile","points":12.79},{"name":"CVSS severity","points":4.27}]},"vendorSlug":"mganss","affectedVersions":[{"vendor":"mganss","product":"HtmlSanitizer","versions":["< 5.0.372"]}],"affected":[{"ecosystem":"NuGet","package":"HtmlSanitizer","vulnerableRanges":["<5.0.372"],"patched":["5.0.372"],"from":["GHSA-8j9v-h2vp-2hhv"],"provenance":"source"}],"summary":{"text":"The HtmlSanitizer .NET library by mganss contains a flaw in its HTML cleaning logic that allows script to survive sanitisation when the <style> tag has been explicitly allowed in its configuration.","provenance":"ai","model":"claude-haiku-5-5","generatedAt":"2026-11-20T21:03:10Z"},"euvd":{"id":"EUVD-2021-0498","exploited":false,"provenance":"source"}}