CVE-2021-32838: Regular Expression Denial of Service in flask-restx
7.5
CVSS Score
3.1
Basic Information
CVE ID
GHSA ID
EPSS Score
0.79331%
CWE
Published
9/8/2021
Updated
9/20/2024
KEV Status
No
Technology
Python
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 |
---|---|---|---|
flask-restx | pip | < 0.5.1 | 0.5.1 |
Vulnerability Intelligence
Miggo AI
Root Cause Analysis
The vulnerability stems from the email_regex regular expression in flask_restx/inputs.py, which was explicitly patched in the commit bab31e0 to optimize its complexity. The original regex's server component ([^@]+(?:.[^@]+)*) contained a non-atomic repetition that could cause catastrophic backtracking on malicious inputs. The email validator's call method directly utilizes this regex for validation, making it the entry point for the ReDoS vulnerability. The commit diff, CVE description, and advisory references all explicitly point to this regex as the root cause.