Lucene search

K
osvGoogleOSV:GHSA-XFHP-GMH8-R8V2
HistoryMar 19, 2021 - 9:22 p.m.

printf vulnerable to Regular Expression Denial of Service (ReDoS)

2021-03-1921:22:10
Google
osv.dev
8
printf package
vulnerable
redos
regex string
printf.js
worst-case time complexity
software

EPSS

0.002

Percentile

57.4%

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.

EPSS

0.002

Percentile

57.4%

Related for OSV:GHSA-XFHP-GMH8-R8V2