Security mailing lists by PureSourceCode

CVE-2021-23354

HIGH 7.5CVSS 3.1

printf vulnerable to Regular Expression Denial of Service (ReDoS)

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.

Published
12 Mar 2021
Last modified
8 Jul 2026
Assigned by
report@snyk.io
NVD status
Modified
Weakness
CWE-1333CWE-400
Also known as
GHSA-xfhp-gmh8-r8v2SNYK-JS-PRINTF-1072096
Sources
NVDJSONOSV GHSA-xfhp-gmh8-r8v2JSON

Scores

SourceScored byVersionScoreVector / decision
NVD nvd@nist.gov (Primary) CVSS 3.1 HIGH 7.5 CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H
OSV GitHub CVSS 3.1 HIGH 7.5 CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H
NVD report@snyk.io (Secondary) CVSS 3.1 MEDIUM 5.3 CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:L
NVD nvd@nist.gov (Primary) CVSS 2.0 MEDIUM 5.0 AV:N/AC:L/Au:N/C:N/I:N/A:P

Affected

SourceVendor / ecosystemProduct / packageAffected versionsFixed in
NVD adaltas printf
cpe:2.3:a:adaltas:printf:*:*:*:*:*:node.js:*:*
< 0.6.1 0.6.1
OSV npm printf < 0.6.1 0.6.1

References

History

  • 25 Nov 2026 20:32 UTC · NVD: first stored (published 12 Mar 2021)
  • 25 Nov 2026 20:11 UTC · OSV: first stored (published 19 Mar 2021)
An unhandled error has occurred. Reload ×

Rejoining the server...

Rejoin failed... trying again in seconds.

Failed to rejoin.
Please retry or reload the page.

The session has been paused by the server.

Failed to resume the session.
Please retry or reload the page.