GHSA-XFHP-GMH8-R8V2

Vulnerability from github – Published: 2021-03-19 21:22 – Updated: 2023-09-08 20:24
VLAI?
Summary
printf vulnerable to Regular Expression Denial of Service (ReDoS)
Details

The package printf before 0.6.1 are vulnerable to Regular Expression Denial of Service (ReDoS) via the regex string

/\%(?:\(([\w_.]+)\)|([1-9]\d*)\$)?([0 +\-\]*)(\*|\d+)?(\.)?(\*|\d+)?[hlL]?([\%bscdeEfFgGioOuxX])/g

in lib/printf.js. The vulnerable regular expression has cubic worst-case time complexity.

Show details on source website

{
  "affected": [
    {
      "package": {
        "ecosystem": "npm",
        "name": "printf"
      },
      "ranges": [
        {
          "events": [
            {
              "introduced": "0"
            },
            {
              "fixed": "0.6.1"
            }
          ],
          "type": "ECOSYSTEM"
        }
      ]
    }
  ],
  "aliases": [
    "CVE-2021-23354"
  ],
  "database_specific": {
    "cwe_ids": [
      "CWE-400"
    ],
    "github_reviewed": true,
    "github_reviewed_at": "2021-03-15T18:59:14Z",
    "nvd_published_at": "2021-03-12T15:15:00Z",
    "severity": "HIGH"
  },
  "details": "The package printf before 0.6.1 are vulnerable to Regular Expression Denial of Service (ReDoS) via the regex string \n```regex\n/\\%(?:\\(([\\w_.]+)\\)|([1-9]\\d*)\\$)?([0 +\\-\\]*)(\\*|\\d+)?(\\.)?(\\*|\\d+)?[hlL]?([\\%bscdeEfFgGioOuxX])/g\n```\n in `lib/printf.js`. The vulnerable regular expression has cubic worst-case time complexity.",
  "id": "GHSA-xfhp-gmh8-r8v2",
  "modified": "2023-09-08T20:24:11Z",
  "published": "2021-03-19T21:22:10Z",
  "references": [
    {
      "type": "ADVISORY",
      "url": "https://nvd.nist.gov/vuln/detail/CVE-2021-23354"
    },
    {
      "type": "WEB",
      "url": "https://github.com/adaltas/node-printf/issues/31"
    },
    {
      "type": "WEB",
      "url": "https://github.com/adaltas/node-printf/pull/32"
    },
    {
      "type": "WEB",
      "url": "https://github.com/adaltas/node-printf/commit/a8502e7c9b0b22555696a2d8ef67722086413a68"
    },
    {
      "type": "WEB",
      "url": "https://snyk.io/vuln/SNYK-JS-PRINTF-1072096"
    }
  ],
  "schema_version": "1.4.0",
  "severity": [
    {
      "score": "CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H",
      "type": "CVSS_V3"
    }
  ],
  "summary": "printf vulnerable to Regular Expression Denial of Service (ReDoS)"
}


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…