{"id":"GHSA-xfhp-gmh8-r8v2","summary":"printf vulnerable to Regular Expression Denial of Service (ReDoS)","details":"The package printf before 0.6.1 are vulnerable to Regular Expression Denial of Service (ReDoS) via the regex string \n```regex\n/\\%(?:\\(([\\w_.]+)\\)|([1-9]\\d*)\\$)?([0 +\\-\\]*)(\\*|\\d+)?(\\.)?(\\*|\\d+)?[hlL]?([\\%bscdeEfFgGioOuxX])/g\n```\n in `lib/printf.js`. The vulnerable regular expression has cubic worst-case time complexity.","aliases":["CVE-2021-23354","SNYK-JS-PRINTF-1072096"],"modified":"2026-05-07T04:57:23.863595060Z","published":"2021-03-19T21:22:10Z","database_specific":{"severity":"HIGH","github_reviewed":true,"github_reviewed_at":"2021-03-15T18:59:14Z","nvd_published_at":"2021-03-12T15:15:00Z","cwe_ids":["CWE-400"]},"references":[{"type":"ADVISORY","url":"https://nvd.nist.gov/vuln/detail/CVE-2021-23354"},{"type":"WEB","url":"https://github.com/adaltas/node-printf/issues/31"},{"type":"WEB","url":"https://github.com/adaltas/node-printf/pull/32"},{"type":"WEB","url":"https://github.com/adaltas/node-printf/commit/a8502e7c9b0b22555696a2d8ef67722086413a68"},{"type":"WEB","url":"https://snyk.io/vuln/SNYK-JS-PRINTF-1072096"}],"affected":[{"package":{"name":"printf","ecosystem":"npm","purl":"pkg:npm/printf"},"ranges":[{"type":"SEMVER","events":[{"introduced":"0"},{"fixed":"0.6.1"}]}],"database_specific":{"source":"https://github.com/github/advisory-database/blob/main/advisories/github-reviewed/2021/03/GHSA-xfhp-gmh8-r8v2/GHSA-xfhp-gmh8-r8v2.json"}}],"schema_version":"1.9.0","severity":[{"type":"CVSS_V3","score":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H"}]}