Miggo Logo

CVE-2022-35923: v8n vulnerable to Inefficient Regular Expression Complexity

7.5

CVSS Score
3.1

Basic Information

EPSS Score
0.69071%
Published
10/7/2022
Updated
7/31/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
v8nnpm< 1.5.11.5.1

Vulnerability Intelligence
Miggo AIMiggo AI

Miggo AIRoot Cause Analysis

The vulnerability stems from regex patterns with nested quantifiers ([a-z]+\s*)+ and ([A-Z]+\s*)+ that exhibit exponential time complexity when matching crafted inputs. The commit diff shows these regex-based implementations were replaced with direct string comparison checks in the patch, confirming they were the vulnerable components. The payload example demonstrates how small inputs could trigger excessive backtracking, matching the ReDoS pattern described in CWE-1333.

Vulnerable functions

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

WAF Protection Rules

WAF Rule

### Imp**t In***i*i*nt r**ul*r *xpr*ssion *ompl*xity o* `low*r**s*()` *n* `upp*r**s*()` r***x *oul* l*** to * **ni*l o* s*rvi** *tt**k. Wit* * *orm** p*ylo** `'*' + '*'.r*p**t(i) + '*'`, only ** ***r**t*rs p*ylo** *oul* t*k* ***** ms tim* *x**ution w

Reasoning

T** vuln*r**ility st*ms *rom r***x p*tt*rns wit* n*st** qu*nti*i*rs ([*-z]+\s*)+ *n* ([*-Z]+\s*)+ t**t *x*i*it *xpon*nti*l tim* *ompl*xity w**n m*t**in* *r**t** inputs. T** *ommit *i** s*ows t**s* r***x-**s** impl*m*nt*tions w*r* r*pl**** wit* *ir**t