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-2021-43788 Vulnerability in npm package nodebb
CVE-2022-36092 Vulnerability in maven package org.xwiki.platform:xwiki-platform-oldcore
CVE-2022-25231 Vulnerability in npm package node-opcua
CVE-2022-25906 Vulnerability in npm package is-http2
CVE-2020-28052 Vulnerability in maven package bouncycastle:bcprov-jdk14