QID 982025

QID 982025: Nodejs (npm) Security Update for color-string (GHSA-257v-vj4p-3w2h)

In the npm package `color-string`, there is a ReDos (Regular Expression Denial of Service) vulnerability regarding an exponential time complexity for
linearly increasing input lengths for `hwb()` color strings.

Strings reaching more than 5000 characters would see several
milliseconds of processing time; strings reaching more than
50,000 characters began seeing 1500ms (1.5s) of processing time.

The cause was due to a the regular expression that parses
hwb() strings - specifically, the hue value - where
the integer portion of the hue value used a 0-or-more quantifier
shortly thereafter followed by a 1-or-more quantifier.

This caused excessive backtracking and a cartesian scan,
resulting in exponential time complexity given a linear
increase in input length.

Successful exploitation of this vulnerability may affect the confidentiality, integrity, and availability of the targeted user.

  • CVSS V3 rated as Medium - 5.3 severity.
  • CVSS V2 rated as Medium - 5 severity.
  • Solution
    Customers are advised to refer to GHSA-257v-vj4p-3w2h for updates pertaining to this vulnerability.
    Vendor References

    CVEs related to QID 982025

    Software Advisories
    Advisory ID Software Component Link
    GHSA-257v-vj4p-3w2h color-string URL Logo github.com/advisories/GHSA-257v-vj4p-3w2h