GHSA-43CP-6P3Q-2PC4

Vulnerability from github – Published: 2023-10-04 18:52 – Updated: 2023-10-05 19:39
VLAI?
Summary
HtmlSanitizer vulnerable to Cross-site Scripting in Foreign Content
Details

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.

Show details on source website

{
  "affected": [
    {
      "package": {
        "ecosystem": "NuGet",
        "name": "HtmlSanitizer"
      },
      "ranges": [
        {
          "events": [
            {
              "introduced": "0"
            },
            {
              "fixed": "8.0.723"
            }
          ],
          "type": "ECOSYSTEM"
        }
      ]
    },
    {
      "package": {
        "ecosystem": "NuGet",
        "name": "HtmlSanitizer"
      },
      "ranges": [
        {
          "events": [
            {
              "introduced": "8.1.0-beta"
            },
            {
              "fixed": "8.1.722-beta"
            }
          ],
          "type": "ECOSYSTEM"
        }
      ]
    }
  ],
  "aliases": [
    "CVE-2023-44390"
  ],
  "database_specific": {
    "cwe_ids": [
      "CWE-79"
    ],
    "github_reviewed": true,
    "github_reviewed_at": "2023-10-04T18:52:35Z",
    "nvd_published_at": "2023-10-05T14:15:09Z",
    "severity": "MODERATE"
  },
  "details": "### Impact\n\nThe vulnerability occurs in configurations where foreign content is allowed, i.e. either `svg` or `math` are in the list of allowed elements.\nSpecifically, the requirements for the vulnerability are:\n\n1. Allowing one foreign element: `svg`, or `math`\n2. Comments or one raw text element: `iframe`, `noembed`, `xmp`, `title`, `noframes`, `style` or `noscript`\n\nConfigurations that meet the above requirements plus the following are vulnerable to an additional vulnerability:\n\n- Any HTML integration element: `title`, `desc`, `mi`, `mo`, `mn`, `ms`, `mtext`, `annotation-xml`.\n\nIn case an application sanitizes user input with a vulnerable configuration, an attacker could\nbypass the sanitization and inject arbitrary HTML, including JavaScript code.\n\nNote that in the default configuration the vulnerability is not present.\n\n### Patches\n\nThe vulnerability has been fixed in versions 8.0.723 and 8.1.722-beta (preview version).\n\n### Workarounds\n\nDisallow foreign elements `svg` and `math`. This is the case in the default configuration, which is therefore not affected by the vulnerability.\n",
  "id": "GHSA-43cp-6p3q-2pc4",
  "modified": "2023-10-05T19:39:51Z",
  "published": "2023-10-04T18:52:35Z",
  "references": [
    {
      "type": "WEB",
      "url": "https://github.com/mganss/HtmlSanitizer/security/advisories/GHSA-43cp-6p3q-2pc4"
    },
    {
      "type": "ADVISORY",
      "url": "https://nvd.nist.gov/vuln/detail/CVE-2023-44390"
    },
    {
      "type": "WEB",
      "url": "https://github.com/mganss/HtmlSanitizer/commit/ab29319866c020f0cc11e6b92228cd8039196c6e"
    },
    {
      "type": "PACKAGE",
      "url": "https://github.com/mganss/HtmlSanitizer"
    }
  ],
  "schema_version": "1.4.0",
  "severity": [
    {
      "score": "CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:L/I:L/A:N",
      "type": "CVSS_V3"
    }
  ],
  "summary": "HtmlSanitizer vulnerable to Cross-site Scripting in Foreign Content"
}


Log in or create an account to share your comment.




Tags
Taxonomy of the tags.


Loading…

Loading…

Loading…

Sightings

Author Source Type Date

Nomenclature

  • Seen: The vulnerability was mentioned, discussed, or observed by the user.
  • Confirmed: The vulnerability has been validated from an analyst's perspective.
  • Published Proof of Concept: A public proof of concept is available for this vulnerability.
  • Exploited: The vulnerability was observed as exploited by the user who reported the sighting.
  • Patched: The vulnerability was observed as successfully patched by the user who reported the sighting.
  • Not exploited: The vulnerability was not observed as exploited by the user who reported the sighting.
  • Not confirmed: The user expressed doubt about the validity of the vulnerability.
  • Not patched: The vulnerability was not observed as successfully patched by the user who reported the sighting.


Loading…

Detection rules are retrieved from Rulezet.

Loading…

Loading…