Miggo Logo

CVE-2017-20165: debug Inefficient Regular Expression Complexity vulnerability

7.5

CVSS Score
3.1

Basic Information

EPSS Score
0.77728%
Published
1/9/2023
Updated
10/24/2023
KEV Status
No
Technology
TechnologyJavaScript

Technical Details

CVSS Vector
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H
Package NameEcosystemVulnerable VersionsFirst Patched Version
debugnpm< 2.6.92.6.9
debugnpm>= 3.0.0, < 3.1.03.1.0

Vulnerability Intelligence
Miggo AIMiggo AI

Miggo AIRoot 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.

Vulnerable functions

Only Mi**o us*rs **n s** t*is s**tion

WAF Protection Rules

WAF Rule

* vuln*r**ility *l*ssi*i** *s pro*l*m*ti* **s ***n *oun* in ***u*-js ***u* up to *.*.x. T*is *****ts t** *un*tion us**olors o* t** *il* sr*/no**.js. T** m*nipul*tion o* t** *r*um*nt str l***s to in***i*i*nt r**ul*r *xpr*ssion *ompl*xity. Up*r**in* to

Reasoning

T** vuln*r**ility st*ms *rom t** r***x-**s** r*pl***m*nt in t** %o *orm*tt*r (*xports.*orm*tt*rs.o) s*own in t** *ommit *i**. W*il* t** vuln*r**ility **s*ription m*ntions t** 'us**olors' *un*tion, t** **tu*l R**oS v**tor w*s in t** r***x p*tt*rn us**