Miggo Logo

GHSA-jm3v-qxmh-hxwv: Scrapy's redirects ignoring scheme-specific proxy settings

4.3

CVSS Score
3.1

Basic Information

CVE ID
-
EPSS Score
-
CWE
-
Published
5/14/2024
Updated
5/14/2024
KEV Status
No
Technology
TechnologyPython

Technical Details

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

Vulnerability Intelligence
Miggo AIMiggo AI

Miggo AIRoot Cause Analysis

The core vulnerability stems from improper origin comparison in redirect handling. The commit diff shows _build_redirect_request was modified to add scheme/port awareness, replacing simple netloc comparison. Since this function is used by RedirectMiddleware to create redirected requests, both the helper function and the middleware's response processing are implicated. The tests demonstrate scenarios where scheme changes should drop certain headers/proxy associations, confirming the redirect handling chain is the vulnerable component.

Vulnerable functions

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

WAF Protection Rules

WAF Rule

### Imp**t W**n usin* syst*m proxy s*ttin*s, w*i** *r* s***m*-sp**i*i* (i.*. sp**i*i* to `*ttp://` or `*ttps://` URLs), S*r*py w*s not ***ountin* *or s***m* ***n**s *urin* r**ir**ts. *or *x*mpl*, *n *TTP r*qu*st woul* us* t** proxy *on*i*ur** *or *

Reasoning

T** *or* vuln*r**ility st*ms *rom improp*r ori*in *omp*rison in r**ir**t **n*lin*. T** *ommit *i** s*ows _*uil*_r**ir**t_r*qu*st w*s mo*i*i** to *** s***m*/port *w*r*n*ss, r*pl**in* simpl* n*tlo* *omp*rison. Sin** t*is *un*tion is us** *y R**ir**tMi*