CVE-2023-44390
MEDIUM 6.1CVSS 3.1HtmlSanitizer vulnerable to Cross-site Scripting in Foreign Content
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).
- Published
- 5 Oct 2023
- Last modified
- 10 Sep 2026
- Assigned by
- security-advisories@github.com
- NVD status
- Modified
- Weakness
- CWE-79
- Also known as
- GHSA-43cp-6p3q-2pc4
- Sources
- NVDJSONOSV GHSA-43cp-6p3q-2pc4JSON
Scores
| Source | Scored by | Version | Score | Vector / decision |
|---|---|---|---|---|
| NVD | security-advisories@github.com (Secondary) | CVSS 3.1 | MEDIUM 6.1 | CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:L/I:L/A:N |
| NVD | nvd@nist.gov (Primary) | CVSS 3.1 | MEDIUM 6.1 | CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:L/I:L/A:N |
| OSV | GitHub | CVSS 3.1 | MEDIUM 6.1 | CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:L/I:L/A:N |
Affected
| Source | Vendor / ecosystem | Product / package | Affected versions | Fixed in |
|---|---|---|---|---|
| NVD | htmlsanitizer_project | htmlsanitizercpe:2.3:a:htmlsanitizer_project:htmlsanitizer:*:*:*:*:*:*:*:* |
< 8.0.723 | 8.0.723 |
| NVD | htmlsanitizer_project | htmlsanitizercpe:2.3:a:htmlsanitizer_project:htmlsanitizer:8.1.719:beta:*:*:*:*:*:* |
= 8.1.719 | |
| OSV | NuGet | HtmlSanitizer | < 8.0.723 | 8.0.723 |
| OSV | NuGet | HtmlSanitizer | >= 8.1.0-beta, < 8.1.722-beta | 8.1.722-beta |
References
- https://github.com/mganss/HtmlSanitizer/commit/ab29319866c020f0cc11e6b92228cd8039196c6e · Patch, WEB
- https://github.com/mganss/HtmlSanitizer/security/advisories/GHSA-43cp-6p3q-2pc4 · Vendor Advisory, WEB
- https://nvd.nist.gov/vuln/detail/CVE-2023-44390 · ADVISORY
- https://github.com/mganss/HtmlSanitizer · PACKAGE
History
- 25 Nov 2026 20:37 UTC · NVD: first stored (published 5 Oct 2023)
- 25 Nov 2026 20:13 UTC · OSV: first stored (published 4 Oct 2023)