CVE-2021-23354
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.
Does this matter?
High impact if exploited, but EPSS currently rates exploitation as unlikely (2.18%). Schedule it in the normal patch cycle and watch for a rise in EPSS or a public exploit.
Description
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.
- CVSS 3.1
- 7.5 HIGHCVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H
- EPSS
- 2.18% probability · 81th percentile
- CISA KEV
- Not listed
- Weakness
- CWE-1333
- Affected
- adaltas/printf
- Source
- report@snyk.io
References
- https://github.com/adaltas/node-printf/issues/31Exploit, Issue Tracking, Third Party Advisory
- https://github.com/adaltas/node-printf/pull/32Patch, Third Party Advisory
- https://snyk.io/vuln/SNYK-JS-PRINTF-1072096Broken Link
- https://github.com/adaltas/node-printf/issues/31Exploit, Issue Tracking, Third Party Advisory
- https://github.com/adaltas/node-printf/pull/32Patch, Third Party Advisory
- https://snyk.io/vuln/SNYK-JS-PRINTF-1072096Broken Link
Source: NVD record, EPSS from FIRST.org, KEV from CISA. Refreshed daily.