CVE-2021-23354Published Mar 12, 2021 · Mar 12Updated Oct 20
Regular Expression Denial of Service (ReDoS)
printf
Medium5.3Fix available
Affected versions
| Product | Affected | Fixed in |
|---|---|---|
| printf npm |
|
|
Original 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.
From the CVE record · snyk