Miggo Logo

GHSA-qf9m-vfgh-m389: Duplicate Advisory: FastAPI Content-Type Header ReDoS

7.5

CVSS Score
3.1

Basic Information

CVE ID
-
EPSS Score
-
Published
2/5/2024
Updated
2/20/2024
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:H
Package NameEcosystemVulnerable VersionsFirst Patched Version
fastapipip<= 0.109.00.109.1

Vulnerability Intelligence
Miggo AIMiggo AI

Miggo AIRoot Cause Analysis

The vulnerability stems from python-multipart's OPTION_RE regex in parse_options_header, which parses Content-Type headers. The regex pattern (br'(?:;|^)\s*([^' + SPECIAL_CHARS + br']+)\s*=\s*(' + VALUE_STR + br')') has inefficient complexity when processing malicious inputs like repeated backslashes. The function's regex-based parsing was replaced with email.message.Message in the patched version (commit 20f0ef6), confirming this was the vulnerable component. The function's direct role in header parsing and the regex's ReDoS potential make this a high-confidence identification.

Vulnerable functions

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

WAF Protection Rules

WAF Rule

## *upli**t* **visory T*is **visory **s ***n wit**r*wn ****us* it is * *upli**t* o* **S*-*jv*-*r**-*w*p. T*is link is m*int*in** to pr*s*rv* *xt*rn*l r***r*n**s. ## Ori*in*l **s*ription ### Summ*ry W**n usin* *orm **t*, `pyt*on-multip*rt` us*s * R

Reasoning

T** vuln*r**ility st*ms *rom pyt*on-multip*rt's OPTION_R* r***x in p*rs*_options_*****r, w*i** p*rs*s *ont*nt-Typ* *****rs. T** r***x p*tt*rn (*r'(?:;|^)\s*([^' + SP**I*L_***RS + *r']+)\s*=\s*(' + V*LU*_STR + *r')') **s in***i*i*nt *ompl*xity w**n pr