An open API service providing security vulnerability metadata for many open source software ecosystems.

MDE2OlNlY3VyaXR5QWR2aXNvcnlHSFNBLXhmaHAtZ21oOC1yOHYy

High EPSS: 0.00399% (0.59505 Percentile) EPSS:

printf vulnerable to Regular Expression Denial of Service (ReDoS)

Affected Packages Affected Versions Fixed Versions
npm:printf < 0.6.1 0.6.1
211 Dependent packages
18,469 Dependent repositories
1,209,620 Downloads last month

Affected Version Ranges

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

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.

References: