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

- Severity: Medium 6.1 (CVSS:3.1, scored by GitHub_M) `CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:L/I:L/A:N`
- Known to be exploited: not in CISA's catalogue, which lists only what CISA has confirmed
- Likelihood of exploitation in the next 30 days (EPSS): 0.42%, higher than 37% of CVEs (2026-12-01)
- Published: 2023-10-04T18:52:35.000Z
- Modified: 2026-09-10T03:49:25.762Z
- Also known as: GHSA-43cp-6p3q-2pc4
- Weaknesses: CWE-79
- SSVC (CISA-ADP): exploitation none, automatable no, technical impact partial
- Assigned by: GitHub_M

## 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).

(As written by CVE List.)

## Affected

- mganss HtmlSanitizer: < 8.0.723; >= 8.1.0-beta, < 8.1.722-beta
- HtmlSanitizer (NuGet): before 8.0.723; from 8.1.0-beta before 8.1.722-beta
- htmlsanitizer_project htmlsanitizer: before 8.0.723; 8.1.719

## Every score

- GitHub_M: CVSS:3.1 6.1 Medium `CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:L/I:L/A:N`
- GitHub: CVSS:3.1 6.1 Medium `CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:L/I:L/A:N`
- NVD: CVSS:3.1 6.1 Medium `CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:L/I:L/A:N`

## References

- <https://github.com/mganss/HtmlSanitizer/security/advisories/GHSA-43cp-6p3q-2pc4> (vendor-advisory, web)
- <https://github.com/mganss/HtmlSanitizer/commit/ab29319866c020f0cc11e6b92228cd8039196c6e> (patch, web)
- <https://nvd.nist.gov/vuln/detail/CVE-2023-44390> (advisory)
- <https://github.com/mganss/HtmlSanitizer> (package)

## Sources

- CVE List: [CVE-2023-44390](https://www.cve.org/CVERecord?id=CVE-2023-44390), CVE Terms of Use, modified 2024-09-19
- GitHub Advisory Database: [GHSA-43cp-6p3q-2pc4](https://github.com/advisories/GHSA-43cp-6p3q-2pc4), CC-BY-4.0, modified 2026-09-10
- NVD: [CVE-2023-44390](https://nvd.nist.gov/vuln/detail/CVE-2023-44390), Public domain, modified 2026-06-17

---

Page: https://cve.day/CVE-2023-44390 · Whole record: https://cve.day/CVE-2023-44390.json · Rebuilt by cve.day 2026-11-25T22:58:28.474Z
