ghsa-qxg5-2qff-p49r
Vulnerability from github
Published
2021-06-18 19:31
Modified
2021-06-18 19:31
Summary
Passing in a non-string 'html' argument can lead to unsanitized output
Details

A type-confusion vulnerability can cause striptags to concatenate unsanitized strings when an array-like object is passed in as the html parameter. This can be abused by an attacker who can control the shape of their input, e.g. if query parameters are passed directly into the function.

Impact

XSS

Patches

3.2.0

Workarounds

Ensure that the html parameter is a string before calling the function.

Show details on source website


{
  "affected": [
    {
      "package": {
        "ecosystem": "npm",
        "name": "striptags"
      },
      "ranges": [
        {
          "events": [
            {
              "introduced": "0"
            },
            {
              "fixed": "3.2.0"
            }
          ],
          "type": "ECOSYSTEM"
        }
      ]
    }
  ],
  "aliases": [
    "CVE-2021-32696"
  ],
  "database_specific": {
    "cwe_ids": [
      "CWE-241",
      "CWE-79",
      "CWE-843"
    ],
    "github_reviewed": true,
    "github_reviewed_at": "2021-06-18T19:31:21Z",
    "nvd_published_at": "2021-06-18T20:15:00Z",
    "severity": "MODERATE"
  },
  "details": "A type-confusion vulnerability can cause `striptags` to concatenate unsanitized strings when an array-like object is passed in as the `html` parameter. This can be abused by an attacker who can control the shape of their input, e.g. if query parameters are passed directly into the function.\n\n### Impact\n\nXSS\n\n### Patches\n\n`3.2.0`\n\n### Workarounds\n\nEnsure that the `html` parameter is a string before calling the function.\n",
  "id": "GHSA-qxg5-2qff-p49r",
  "modified": "2021-06-18T19:31:21Z",
  "published": "2021-06-18T19:31:35Z",
  "references": [
    {
      "type": "WEB",
      "url": "https://github.com/ericnorris/striptags/security/advisories/GHSA-qxg5-2qff-p49r"
    },
    {
      "type": "ADVISORY",
      "url": "https://nvd.nist.gov/vuln/detail/CVE-2021-32696"
    },
    {
      "type": "WEB",
      "url": "https://github.com/ericnorris/striptags/commit/f252a6b0819499cd65403707ebaf5cc925f2faca"
    },
    {
      "type": "WEB",
      "url": "https://github.com/ericnorris/striptags/releases/tag/v3.2.0"
    },
    {
      "type": "WEB",
      "url": "https://www.npmjs.com/package/striptags"
    }
  ],
  "schema_version": "1.4.0",
  "severity": [
    {
      "score": "CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:L/I:N/A:N",
      "type": "CVSS_V3"
    }
  ],
  "summary": "Passing in a non-string \u0027html\u0027 argument can lead to unsanitized output"
}


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 seen somewhere by the user.
  • Confirmed: The vulnerability is confirmed from an analyst perspective.
  • Exploited: This vulnerability was exploited and seen by the user reporting the sighting.
  • Patched: This vulnerability was successfully patched by the user reporting the sighting.
  • Not exploited: This vulnerability was not exploited or seen by the user reporting the sighting.
  • Not confirmed: The user expresses doubt about the veracity of the vulnerability.
  • Not patched: This vulnerability was not successfully patched by the user reporting the sighting.


Loading…

Loading…