{"id":"CVE-2021-23354","aliases":["CLSA-2026-1772669616","CLSA-2026-1774311624","EUVD-2021-0725","GHSA-xfhp-gmh8-r8v2","SNYK-JS-PRINTF-1072096"],"status":"published","title":"Regular Expression Denial of Service (ReDoS)","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.","severity":{"version":"3.1","score":5.3,"vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:L","level":"medium","assessor":"cna","from":"cve"},"epss":{"day":"2026-11-12","score":0.02176,"percentile":0.82585,"model":"v2026.06.15"},"facts":{"in_kev":false,"known_exploited":false,"public_exploit":false,"fix_available":true},"cwes":["CWE-1333","CWE-400"],"published":"2021-03-12T15:10:16Z","modified":"2026-10-20T10:54:32Z","fixes":[{"ecosystem":"npm","package":"printf","fixed_in":["0.6.1"],"sources":["ghsa","osv"]},{"ecosystem":"TuxCare:npm","package":"printf","fixed_in":["0.2.5-tuxcare.1","0.5.3-tuxcare.1"],"sources":["osv"]}],"affected":[{"source":"ghsa","ecosystem":"npm","package":"printf","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"},{"fixed":"0.6.1"}]}]},{"source":"osv","ecosystem":"TuxCare:npm","package":"printf","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0.2.5-tuxcare.0"},{"fixed":"0.2.5-tuxcare.1"}]}],"versions":["0.2.5"]},{"source":"osv","ecosystem":"TuxCare:npm","package":"printf","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0.5.3-tuxcare.0"},{"fixed":"0.5.3-tuxcare.1"}]}],"versions":["0.5.3"]},{"source":"osv","ecosystem":"npm","package":"printf","ranges":[{"type":"SEMVER","events":[{"introduced":"0"},{"fixed":"0.6.1"}]}]}],"products":[{"vendor":"adaltas","product":"printf"}],"references":[{"url":"https://snyk.io/vuln/SNYK-JS-PRINTF-1072096","tags":["x_refsource_MISC","x_transferred","Broken Link","advisory","web"]},{"url":"https://github.com/adaltas/node-printf/pull/32","tags":["x_refsource_MISC","x_transferred","Patch","Third Party Advisory","fix","web"]},{"url":"https://github.com/adaltas/node-printf/issues/31","tags":["x_refsource_MISC","x_transferred","Exploit","Issue Tracking","Third Party Advisory","report","web"]},{"url":"https://nvd.nist.gov/vuln/detail/CVE-2021-23354","tags":["advisory"]},{"url":"https://github.com/adaltas/node-printf/commit/a8502e7c9b0b22555696a2d8ef67722086413a68","tags":["web"]},{"url":"https://github.com/advisories/GHSA-xfhp-gmh8-r8v2"}],"sources":{"cve":[{"id":"CVE-2021-23354","title":"Regular Expression Denial of Service (ReDoS)","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.","status":"published","published":"2021-03-12T15:10:16.014Z","modified":"2024-09-17T03:32:43.212Z","cvss":[{"version":"3.1","score":5.3,"vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:L","level":"medium","assessor":"cna"}],"updated_at":"2026-11-02T14:33:00.488332Z"}],"euvd":[{"id":"EUVD-2021-0725","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.","status":"published","published":"2021-03-12T15:10:16Z","modified":"2024-09-17T03:32:43Z","cvss":[{"version":"3.1","score":5.3,"vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:L","level":"medium"}],"updated_at":"2026-11-03T00:28:31.175316Z"}],"ghsa":[{"id":"GHSA-xfhp-gmh8-r8v2","title":"printf vulnerable to Regular Expression Denial of Service (ReDoS)","description":"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.","status":"published","published":"2021-03-19T21:22:10Z","modified":"2023-09-08T20:24:12Z","cvss":[{"version":"3.1","score":7.5,"vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H","level":"high"}],"cwes":["CWE-400"],"updated_at":"2026-11-02T14:37:03.287418Z"}],"nvd":[{"id":"CVE-2021-23354","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.","status":"published","published":"2021-03-12T15:15:14.207Z","modified":"2026-06-17T03:38:36.587Z","cvss":[{"version":"3.1","score":5.3,"vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:L","level":"medium","assessor":"secondary"},{"version":"3.1","score":7.5,"vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H","level":"high","assessor":"primary"},{"version":"2.0","score":5,"vector":"AV:N/AC:L/Au:N/C:N/I:N/A:P","level":"medium","assessor":"primary"}],"cwes":["CWE-1333"],"updated_at":"2026-11-02T14:06:50.805771Z"}],"osv":[{"id":"CVE-2021-23354","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.","status":"published","published":"2021-03-12T15:15:14.207Z","modified":"2026-10-20T10:54:32.134543871Z","cvss":[{"version":"3.1","score":7.5,"vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H","level":"high"}],"updated_at":"2026-11-02T15:44:18.367807Z"},{"id":"GHSA-xfhp-gmh8-r8v2","title":"printf vulnerable to Regular Expression Denial of Service (ReDoS)","description":"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.","status":"published","published":"2021-03-19T21:22:10Z","modified":"2026-07-08T06:50:03.433452551Z","cvss":[{"version":"3.1","score":7.5,"vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H","level":"high"}],"cwes":["CWE-400"],"updated_at":"2026-11-02T15:46:59.835583Z"},{"id":"CLSA-2026-1772669616","title":"TuxCare security update for printf (1 CVE)","description":"TuxCare rebuilt printf to address 1 CVE. Fixed in 0.2.5-tuxcare.1.","status":"published","published":"2026-08-04T14:52:10Z","modified":"2026-10-15T09:45:27.185855892Z","updated_at":"2026-11-02T15:43:43.249928Z"},{"id":"CLSA-2026-1774311624","title":"TuxCare security update for printf (1 CVE)","description":"TuxCare rebuilt printf to address 1 CVE. Fixed in 0.5.3-tuxcare.1.","status":"published","published":"2026-08-04T14:52:14Z","modified":"2026-10-15T09:47:48.037668897Z","updated_at":"2026-11-02T15:43:43.621843Z"}]}}
