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.
Remediation
References
https://github.com/adaltas/node-printf/issues/31
https://github.com/adaltas/node-printf/pull/32
https://snyk.io/vuln/SNYK-JS-PRINTF-1072096
Related Vulnerabilities
CVE-2020-7609 Vulnerability in npm package node-rules
CVE-2020-17480 Vulnerability in npm package tinymce
CVE-2021-23449 Vulnerability in npm package vm2
CVE-2022-31198 Vulnerability in npm package @openzeppelin/contracts-upgradeable
CVE-2023-29922 Vulnerability in maven package tech.powerjob:powerjob