Loading...
Skip to main content

CVE-2023-44390 — Vulnerability in HtmlSanitizer — CVE Details

MEDIUM

HtmlSanitizer vulnerable to Cross-site Scripting in Foreign Content

Published October 4, 2023Updated September 10, 2026Source: osv

Summary

### Impact The vulnerability occurs in configurations where foreign content is allowed, i.e. either `svg` or `math` are in the list of allowed elements. Specifically, the requirements for the vulnerability are: 1. Allowing one foreign element: `svg`, or `math` 2. Comments or one raw text element: `iframe`, `noembed`, `xmp`, `title`, `noframes`, `style` or `noscript` Configurations that meet the above requirements plus the following are vulnerable to an additional vulnerability: - Any HTML integration element: `title`, `desc`, `mi`, `mo`, `mn`, `ms`, `mtext`, `annotation-xml`. In 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. ### Patches The vulnerability has been fixed in versions 8.0.723 and 8.1.722-beta (preview version). ### Workarounds Disallow foreign elements `svg` and `math`. This is the case in the default configuration, which is therefore not affected by the vulnerability.

Advisory Timeline

  • First published October 4, 2023 (1104 days ago).
  • Last revised September 10, 2026 — 1071 days after initial publication.

Remediation

Upgrade to the fixed version using your package manager.

NuGet
Update HtmlSanitizer to 8.1.722-beta or later
dotnet add package HtmlSanitizer --version 8.1.722-beta
NuGet
Update HtmlSanitizer to 8.0.723 or later
dotnet add package HtmlSanitizer --version 8.0.723

After upgrading, run your dependency scanner again to confirm the vulnerability is resolved.

Affected Packages (2)

Affects 1 ecosystem: nuget (1).

PackageEcosystemAffectedFixed In
HtmlSanitizer
nuget
8.1.717-beta, 8.1.719-beta8.1.722-beta
HtmlSanitizer
nuget
1.0.4925.29815, 1.0.4927.30873, 1.1.5243.28448, 1.1.5297.28403 (+91 more)8.0.723

Vulnerability Classification

Common Weakness Enumeration (CWE) identifiers for this vulnerability type.

  • CWE-79
    Cross-site Scripting (XSS)MITRE

CVSS Score Breakdown

What the CVSS (Common Vulnerability Scoring System) 6.1 score means for each attack dimension.

Attack Vector
Network
Attack Complexity
Low
Privileges Required
None
User Interaction
Required
Scope
Changed
Confidentiality
Low
Integrity
Low
Availability
None

CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:L/I:L/A:N

Frequently Asked Questions

What is CVE-2023-44390?
HtmlSanitizer vulnerable to Cross-site Scripting in Foreign Content This vulnerability has been assigned a severity rating of MEDIUM (CVSS score: 6.1/10).
How do I check if my project is affected by CVE-2023-44390?
CVE-2023-44390 affects HtmlSanitizer. Use GeekWala's free vulnerability scanner to check your dependencies against CVE-2023-44390 and 200,000+ other known vulnerabilities.

Severity & Exploitability

CVSS Score
6.1

Exploitation requires specific conditions or has limited impact. Remediate within weeks.

Also Known As

GHSA-43cp-6p3q-2pc4

Related CVEs

Check if you're affected

Scan your dependencies to see if this vulnerability affects your projects.

Scan Your Dependencies