CVE-2017-20165: debug Inefficient Regular Expression Complexity vulnerability
7.5
CVSS Score
3.1
Basic Information
CVE ID
GHSA ID
EPSS Score
0.77728%
CWE
Published
1/9/2023
Updated
10/24/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:H
| Package Name | Ecosystem | Vulnerable Versions | First Patched Version |
|---|---|---|---|
| debug | npm | < 2.6.9 | 2.6.9 |
| debug | npm | >= 3.0.0, < 3.1.0 | 3.1.0 |
Vulnerability Intelligence
Miggo AI
Root Cause Analysis
The vulnerability stems from the regex-based replacement in the %o formatter (exports.formatters.o) shown in the commit diff. While the vulnerability description mentions the 'useColors' function, the actual ReDoS vector was in the regex pattern used by the formatter to collapse whitespace. The patch replaced the regex with a safer string manipulation approach (split-trim-join), confirming this as the vulnerable code path. The CWE-1333 classification and commit message ('remove ReDoS regexp in %o formatter') directly implicate this function.