Regular expression denial of service (ReDoS) in printf
Priority LOW 37CWE-1333Published · Updated
Key facts
- Attack vector
- Network
- Privileges required
- None
- User interaction
- None
- Attack complexity
- Low
- Impact type
- Denial of service
- Confidentiality · integrity · availability
- None · None · High
- Fix status
- Fixed
Attack profile from CVSS 3.1 · NVD. Fix status from CNA and GitHub. Impact type from CWE-1333.
Summary
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.
Why it matters now
EPSS 0.02176 82nd percentileScored 2026-11-07
Public exploit Yes 1 exploit referenceTagged by NVD
Fix Fixed printf: 0.6.1printf (npm): 0.6.1
SSVC decision points
Not available: CISA has not published SSVC decision points for this record.
Affected products
| Vendor | Product | Affected versions | Fixed in | Status | Source |
|---|---|---|---|---|---|
| — | printf | before 0.6.1 | 0.6.1 | Patch available | CNA |
| — | printf (npm) | before 0.6.1 | 0.6.1 | Patch available | GHSA-xfhp-gmh8-r8v2 |
- printf Vendor— Affected before 0.6.1 Fixed in 0.6.1 Patch available CNA
- printf (npm) Vendor— Affected before 0.6.1 Fixed in 0.6.1 Patch available GHSA-xfhp-gmh8-r8v2
Remediation
- Fix · CNA printf Fixed in 0.6.1
- Fix · GHSA-xfhp-gmh8-r8v2 printf (npm) Fixed in 0.6.1 Advisory →
Timeline
- 2026-10-02 Threatist record created from CVE-2021-23354
- 2026-10-03 Alias added: GHSA-xfhp-gmh8-r8v2
References
Sources
- CVE-2021-23354 · CVE Program
- CVE-2021-23354 · NVD
- FIRST EPSS
- GHSA-xfhp-gmh8-r8v2 · GitHub Advisory Database · CC BY 4.0
This product uses the NVD API but is not endorsed or certified by the NVD. Sources and licences