Read the docs
TI-2023-28303 Aliases CVE-2023-51652GHSA-8x6f-956f-q43w

OWASP.AntiSamy mXSS when preserving comments

Priority LOW 28CWE-79Published · Updated

Key facts

Attack vector
Network
Privileges required
None
User interaction
Required
Attack complexity
Low
Impact type
Cross-site scripting
Confidentiality · integrity · availability
Low · Low · None
Fix status
Fixed

Attack profile from CVSS 3.1 · CNA. Fix status from CNA and GitHub. Impact type from CWE-79.

Summary

OWASP AntiSamy .NET is a library for performing cleansing of HTML coming from untrusted sources. Prior to version 1.2.0, there is a potential for a mutation cross-site scripting (mXSS) vulnerability in AntiSamy caused by flawed parsing of the HTML being sanitized. To be subject to this vulnerability the `preserveComments` directive must be enabled in your policy file and also allow for certain tags at the same time. As a result, certain crafty inputs can result in elements in comment tags being interpreted as executable when using AntiSamy's sanitized output. This is patched in OWASP AntiSamy .NET 1.2.0 and later. See important remediation details in the reference given below. As a workaround, manually edit the AntiSamy policy file (e.g., antisamy.xml) by deleting the `preserveComments` directive or setting its value to `false`, if present. Also it would be useful to make AntiSamy remove the `noscript` tag by adding a line described in the GitHub Security Advisory to the tag definitions under the `<tagrules>` node, or deleting it entirely if present. As the previously mentioned policy settings are preconditions for the mXSS attack to work, changing them as recommended should be sufficient to protect you against this vulnerability when using a vulnerable version of this library. However, the existing bug would still be present in AntiSamy or its parser dependency (HtmlAgilityPack). The safety of this workaround relies on configurations that may change in the future and don't address the root cause of the vulnerability. As such, it is strongly recommended to upgrade to a fixed version of AntiSamy.

Why it matters now

Exploitation None reported CISA SSVC · not in CISA KEV
EPSS 0.00447 39th percentileScored 2026-11-07
Fix Fixed antisamy-dotnet (spassarop): 1.2.0OWASP.AntiSamy (NuGet): 1.2.0

SSVC decision points

CISA ADP · SSVC 2.0.3

Exploitation
None
Automatable
No
Technical impact
Partial

The decision (Track, Attend, Act) also depends on your mission and well-being impact; see CISA's SSVC guide.

Affected products

VendorProductAffected versionsFixed inStatusSource
spassaropantisamy-dotnetbefore 1.2.01.2.0Patch availableCNA
—OWASP.AntiSamy (NuGet)before 1.2.01.2.0Patch availableGHSA-8x6f-956f-q43w
  • antisamy-dotnet Vendorspassarop Affected before 1.2.0 Fixed in 1.2.0 Patch available CNA
  • OWASP.AntiSamy (NuGet) Vendor— Affected before 1.2.0 Fixed in 1.2.0 Patch available GHSA-8x6f-956f-q43w

CPE configurations NVD · 1

CPEVersionsRoleVendor
cpe:2.3:a:spassarop:owasp_antisamy_.net:*:*:*:*:*:*:*:*before 1.2.0Vulnerablespassarop
  • cpe:2.3:a:spassarop:owasp_antisamy_.net:*:*:*:*:*:*:*:* Versions before 1.2.0 Vulnerable ·spassarop

Remediation

  • Fix · CNA antisamy-dotnet (spassarop) Fixed in 1.2.0
  • Fix · GHSA-8x6f-956f-q43w OWASP.AntiSamy (NuGet) Fixed in 1.2.0 Advisory →

Timeline

  1. 2026-10-02 Threatist record created from CVE-2023-51652
  2. 2026-10-03 Alias added: GHSA-8x6f-956f-q43w

References

Sources