Skip to content
Heist/ feed
Back to feed
Medium

mXSS in AntiSamy

Type: advisorySources: OSV

AntiSamy is a library for performing fast, configurable cleansing of HTML coming from untrusted sources. Prior to version 1.7.4, there is a potential for a mutation XSS (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 issue has been patched in AntiSamy 1.7.4 and later.

Products
Not specified
Affected versions
Not specified
Fixed versions
Not specified
CVEs
CVE-2023-43643
Confirmed fixed CVEs
Not specified
Updated in this feed
6 Nov 2026, 00:57 UTC · Revision 1

Source evidence

mXSS in AntiSamy

core-osv · Original source

Published 9 Oct 2023, 13:31 UTC

AntiSamy is a library for performing fast, configurable cleansing of HTML coming from untrusted sources. Prior to version 1.7.4, there is a potential for a mutation XSS (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 issue has been patched in AntiSamy 1.7.4 and later.

osv:CVE-2023-43643
Complete source record
{
  "id": "7e131dc182c4ee21d8abb4501068bf99fb707e93937e76ec0fe465b8d631148a",
  "url": "https://osv.dev/vulnerability/CVE-2023-43643",
  "method": "structured",
  "payload": {
    "kind": "advisory",
    "title": "mXSS in AntiSamy",
    "summary": "AntiSamy is a library for performing fast, configurable cleansing of HTML coming from untrusted sources. Prior to version 1.7.4, there is a potential for a mutation XSS (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 issue has been patched in AntiSamy 1.7.4 and later.",
    "evidence": "osv:CVE-2023-43643",
    "products": [],
    "severity": "medium",
    "structured": {
      "id": "CVE-2023-43643",
      "aliases": [
        "CVE-2023-43643",
        "GHSA-pcf2-gh6g-h5r2"
      ],
      "metrics": [
        {
          "type": "CVSS_V3",
          "score": "CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:L/I:L/A:N"
        }
      ],
      "affected": [
        {
          "ranges": [
            {
              "repo": "https://github.com/nahsra/antisamy",
              "type": "GIT",
              "events": [
                {
                  "introduced": "0"
                },
                {
                  "fixed": "45c78f1b4de6e30ce18a7338fd6d200d60be1a05"
                }
              ],
              "database_specific": {
                "extracted_events": [
                  {
                    "cpe": "cpe:2.3:a:antisamy_project:antisamy:*:*:*:*:*:*:*:*",
                    "range": [
                      {
                        "introduced": "0"
                      },
                      {
                        "fixed": "1.7.4"
                      }
                    ],
                    "source": "CPE_RANGE"
                  },
                  {
                    "range": [
                      {
                        "fixed": "45c78f1b4de6e30ce18a7338fd6d200d60be1a05"
                      }
                    ],
                    "source": "REFERENCES_TAG",
                    "original_tag": "v1.7.4"
                  }
                ]
              }
            }
          ],
          "versions": [
            "v1.7.3",
            "v1.7.2",
            "v1.7.1",
            "v1.7.0",
            "v1.6.8",
            "v1.6.7",
            "v1.6.6.1",
            "v1.6.6",
            "v1.6.5",
            "v1.6.4",
            "1.6.3",
            "v1.6.2",
            "v1.6.1",
            "v1.6.0",
            "v1.5.13",
            "v1.5.12",
            "v1.5.11",
            "v1.5.10",
            "v1.5.9",
            "v1.5.8",
            "v1.5.7"
          ],
          "database_specific": {
            "source": "https://storage.googleapis.com/cve-osv-conversion/osv-output/CVE-2023-43643.json"
          }
        }
      ],
      "modified": "2026-10-28T02:30:45.795686262Z",
      "provider": "osv",
      "references": [
        "https://github.com/nahsra/antisamy/releases/tag/v1.7.4",
        "https://github.com/CVEProject/cvelistV5/tree/main/cves/2023/43xxx/CVE-2023-43643.json",
        "https://github.com/nahsra/antisamy/security/advisories/GHSA-pcf2-gh6g-h5r2",
        "https://nvd.nist.gov/vuln/detail/CVE-2023-43643"
      ],
      "provider_metadata": {
        "cwe_ids": [
          "CWE-79"
        ],
        "cna_assigner": "GitHub_M",
        "osv_generated_from": "https://github.com/CVEProject/cvelistV5/tree/main/cves/2023/43xxx/CVE-2023-43643.json"
      }
    },
    "related_cves": [
      {
        "value": "CVE-2023-43643",
        "evidence": "/id"
      }
    ],
    "security_relevant": true,
    "severity_evidence": "/severity/0/score"
  },
  "source_id": "core-osv",
  "document_id": 513658,
  "published_at": "2023-10-09T13:31:46.324+00:00"
}