GHSA-xfhp-gmh8-r8v2

    Dashboard / Vulnerabilities / GHSA-xfhp-gmh8-r8v2

    GHSA-xfhp-gmh8-r8v2

    Published: 19 Mar 2021Last Modified: 8 Jul 2026

    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 ```regex /\%(?:\(([\w_.]+)\)|([1-9]\d*)\$)?([0 +\-\]*)(\*|\d+)?(\.)?(\*|\d+)?[hlL]?([\%bscdeEfFgGioOuxX])/g ``` in `lib/printf.js`. The vulnerable regular expression has cubic worst-case time complexity.

    Affected packages

    Package

    Name: printf

    Purl: pkg:npm/printf

    Affected ranges

    Type: SEMVER

    Events:

    Introduced- 0
    Fixed -0.6.1

    Affected versions

    Common Vulnerability Scoring System

    Attack Vector
    Network
    Adjacent
    Local
    Physical
    Privileges Required
    None
    Low
    High
    User Interaction
    None
    Required
    Scope
    Unchanged
    Changed
    Confidentiality
    None
    Low
    High
    Integrity
    None
    Low
    High
    Availability
    None
    Low
    High
    GHSA-xfhp-gmh8-r8v2 | CVE-DB