CVE-2021-29060: Regular Expression Denial of Service (ReDOS)
5.3
CVSS Score
3.1
Basic Information
CVE ID
GHSA ID
EPSS Score
0.55871%
CWE
Published
6/22/2021
Updated
2/1/2023
KEV Status
No
Technology
JavaScript
Technical Details
CVSS Vector
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:L
Package Name | Ecosystem | Vulnerable Versions | First Patched Version |
---|---|---|---|
color-string | npm | < 1.5.5 | 1.5.5 |
Vulnerability Intelligence
Miggo AI
Root Cause Analysis
The vulnerability was explicitly traced to the hwb parsing regex in cs.get.hwb function as shown in the commit diff. The original regex pattern ([+-]?\d*[.]?\d+) allowed exponential backtracking due to ambiguous quantifiers. The patch replaced \d* with \d{0,3} to limit backtracking potential. Multiple sources (CVE description, commit diff, PoC) confirm this function as the attack vector.