Miggo Logo

CVE-2022-24761: HTTP Request Smuggling in waitress

7.5

CVSS Score
3.1

Basic Information

EPSS Score
0.44028%
Published
3/18/2022
Updated
11/19/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:H/A:N
Package NameEcosystemVulnerable VersionsFirst Patched Version
waitresspip< 2.1.12.1.1

Vulnerability Intelligence
Miggo AIMiggo AI

Miggo AIRoot Cause Analysis

The vulnerability stems from two key functions: 1) parse_header() in parser.py directly converted Content-Length to int() without validating the string contains only digits, allowing RFC-violating values. 2) ChunkedReceiver's received() method in receiver.py processed chunk sizes without proper hex validation and handled extensions without checking for illegal characters. The commit diff shows these functions were patched with regex validations (ONLY_DIGIT_RE and ONLY_HEXDIG_RE) confirming these were the vulnerable points.

Vulnerable functions

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

WAF Protection Rules

WAF Rule

### Imp**t W**n usin* W*itr*ss ***in* * proxy t**t *o*s not prop*rly v*li**t* t** in*omin* *TTP r*qu*st m*t***s t** R****** st*n**r*, W*itr*ss *n* t** *ront*n* proxy m*y *is**r** on w**r* on* r*qu*st st*rts *n* w**r* it *n*s. T*is woul* *llow r*qu*

Reasoning

T** vuln*r**ility st*ms *rom two k*y *un*tions: *) p*rs*_*****r() in p*rs*r.py *ir**tly *onv*rt** *ont*nt-L*n*t* to int() wit*out v*li**tin* t** strin* *ont*ins only *i*its, *llowin* R**-viol*tin* v*lu*s. *) **unk**R***iv*r's r***iv**() m*t*o* in r**