Ecosyste.ms: Advisories
An open API service providing security vulnerability metadata for many open source software ecosystems.
Security Advisories: MDE2OlNlY3VyaXR5QWR2aXNvcnlHSFNBLXhmaHAtZ21oOC1yOHYy
printf vulnerable to Regular Expression Denial of Service (ReDoS)
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.
JSON: https://advisories.ecosyste.ms/api/v1/advisories/MDE2OlNlY3VyaXR5QWR2aXNvcnlHSFNBLXhmaHAtZ21oOC1yOHYy
Source: GitHub Advisory Database
Origin: Unspecified
Severity: High
Classification: General
Published: over 3 years ago
Updated: about 1 year ago
CVSS Score: 7.5
CVSS vector: CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H
Identifiers: GHSA-xfhp-gmh8-r8v2, CVE-2021-23354
References:
- https://nvd.nist.gov/vuln/detail/CVE-2021-23354
- https://github.com/adaltas/node-printf/issues/31
- https://github.com/adaltas/node-printf/pull/32
- https://github.com/adaltas/node-printf/commit/a8502e7c9b0b22555696a2d8ef67722086413a68
- https://snyk.io/vuln/SNYK-JS-PRINTF-1072096
- https://github.com/advisories/GHSA-xfhp-gmh8-r8v2
Blast Radius: 32.0
Affected Packages
npm:printf
Dependent packages: 211Dependent repositories: 18,469
Downloads: 1,071,637 last month
Affected Version Ranges: < 0.6.1
Fixed in: 0.6.1
All affected versions: 0.0.2, 0.0.3, 0.0.4, 0.0.5, 0.0.6, 0.0.7, 0.1.0, 0.1.1, 0.1.2, 0.1.3, 0.2.0, 0.2.1, 0.2.2, 0.2.3, 0.2.4, 0.2.5, 0.3.0, 0.4.0, 0.5.1, 0.5.2, 0.5.3, 0.6.0
All unaffected versions: 0.6.1