Vulnerability · Published Oct 5, 2023 · Assigned by GitHub_M

CVE-2023-44390HtmlSanitizer vulnerable to Cross-site Scripting in Foreign Content

Medium 6.1

In plain English

A medium-severity cross-site scripting in HtmlSanitizer from mganss. There are no confirmed reports of exploitation so far. The chance it is exploited in the next 30 days is estimated at 0.4% (higher than 36% of all known vulnerabilities). Fixed versions are available - upgrade the affected package.

Severity (CVSS 3.1)6.1Medium
Exploit odds (30 days)0.4%top 63.9% of all CVEs
Exploited in the wildNo reportsCISA SSVC: none
Attack toolingNoneno public tooling known

Official description

HtmlSanitizer is a .NET library for cleaning HTML fragments and documents from constructs that can lead to XSS attacks. The vulnerability occurs in configurations where foreign content is allowed, i.e. either `svg` or `math` are in the list of allowed elements. In the case an application sanitizes user input with a vulnerable configuration, an attacker could bypass the sanitization and inject arbitrary HTML, including JavaScript code. Note that in the default configuration the vulnerability is not present. The vulnerability has been fixed in versions 8.0.723 and 8.1.722-beta (preview version).

Affected packages & fixed versions

EcosystemPackageFixed inAdvisory
NuGethtmlsanitizer8.0.723GHSA-43cp-6p3q-2pc4
NuGethtmlsanitizer8.1.722-betaGHSA-43cp-6p3q-2pc4

Affected products (as reported)

VendorProductVersions
mganss HtmlSanitizer < 8.0.723>= 8.1.0-beta, < 8.1.722-beta

Weakness: CWE-79 · Vector: CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:L/I:L/A:N

References