Miggo Logo

CVE-2022-21195: Regular expression denial of service in url_regex

5.3

CVSS Score
3.1

Basic Information

EPSS Score
0.54271%
Published
5/21/2022
Updated
1/27/2023
KEV Status
No
Technology
TechnologyPython

Technical Details

CVSS Vector
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:L
Package NameEcosystemVulnerable VersionsFirst Patched Version
url_regexpip<= 1.0.4

Vulnerability Intelligence
Miggo AIMiggo AI

Miggo AIRoot Cause Analysis

The vulnerability stems from the regular expression implementation in the UrlRegex class. The provided PoC demonstrates ReDoS through the detect method, which applies the vulnerable regex pattern. The advisory links directly to the url_regex.py file containing the regex implementation. While the exact regex pattern isn't shown in provided sources, the demonstrated attack vector through the detect method and the package's purpose of URL validation confirm this as the entry point for the vulnerable regex execution.

Vulnerable functions

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

WAF Protection Rules

WAF Rule

*ll v*rsions o* p**k*** url-r***x *r* vuln*r**l* to R**ul*r *xpr*ssion **ni*l o* S*rvi** (R**oS) w*i** **n **us* t** *PU us*** to *r*s*.

Reasoning

T** vuln*r**ility st*ms *rom t** r**ul*r *xpr*ssion impl*m*nt*tion in t** UrlR***x *l*ss. T** provi*** Po* **monstr*t*s R**oS t*rou** t** **t**t m*t*o*, w*i** *ppli*s t** vuln*r**l* r***x p*tt*rn. T** **visory links *ir**tly to t** url_r***x.py *il*