Miggo Logo

CVE-2022-1930: Regular expression denial of service in eth-account

5.9

CVSS Score
3.1

Basic Information

EPSS Score
0.23948%
Published
8/23/2022
Updated
1/28/2023
KEV Status
No
Technology
TechnologyPython

Technical Details

CVSS Vector
CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:N/I:N/A:H
Package NameEcosystemVulnerable VersionsFirst Patched Version
eth-accountpip< 0.5.90.5.9

Vulnerability Intelligence
Miggo AIMiggo AI

Miggo AIRoot Cause Analysis

The vulnerability stems from the TYPE_REGEX pattern in validation.py which was modified in the patch. The original regex had nested quantifiers that could cause catastrophic backtracking. The added test case demonstrates this by passing a 30-character '1' string that would cause >1 second delay with the old regex. While the exact function name isn't visible in diffs, the regex is clearly used in structured data validation flow called by encode_structured_data, as shown in the test's load_and_validate_structured_message call. The file path and regex usage context provide high confidence.

Vulnerable functions

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

WAF Protection Rules

WAF Rule

*n *xpon*nti*l R**oS (R**ul*r *xpr*ssion **ni*l o* S*rvi**) **n ** tri***r** in t** *t*-***ount PyPI p**k***, w**n *n *tt**k*r is **l* to supply *r*itr*ry input to t** *n*o**_stru*tur**_**t* m*t*o*

Reasoning

T** vuln*r**ility st*ms *rom t** TYP*_R***X p*tt*rn in v*li**tion.py w*i** w*s mo*i*i** in t** p*t**. T** ori*in*l r***x *** n*st** qu*nti*i*rs t**t *oul* **us* **t*strop*i* ***ktr**kin*. T** ***** t*st **s* **monstr*t*s t*is *y p*ssin* * **-***r**t*