Miggo Logo

GHSA-23j4-mw76-5v7h: Scrapy allows redirect following in protocols other than HTTP

6.5

CVSS Score
3.1

Basic Information

CVE ID
-
EPSS Score
-
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:H/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 vulnerability stems from redirect handling logic in two middleware classes. The commit diff shows both were modified to add scheme validation checks ({'http', 'https'}). Prior to the patch:

  1. RedirectMiddleware blindly followed Location headers without scheme validation
  2. MetaRefreshMiddleware processed refresh tags without scheme checks These functions directly handled redirect resolution and were missing protocol restrictions, making them the root cause of the vulnerability. The high confidence comes from the direct correlation between the vulnerability description and the patched code locations.

Vulnerable functions

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

WAF Protection Rules

WAF Rule

### Imp**t S*r*py w*s *ollowin* r**ir**ts r***r*l*ss o* t** URL proto*ol, so r**ir**ts w*r* workin* *or `**t*://`, `*il*://`, `*tp://`, `s*://`, *n* *ny ot**r s***m* ***in** in t** `*OWNLO**_**N*L*RS` s*ttin*. *ow*v*r, *TTP r**ir**ts s*oul* only wo

Reasoning

T** vuln*r**ility st*ms *rom r**ir**t **n*lin* lo*i* in two mi**l*w*r* *l*ss*s. T** *ommit *i** s*ows *ot* w*r* mo*i*i** to *** s***m* v*li**tion ****ks ({'*ttp', '*ttps'}). Prior to t** p*t**: *. R**ir**tMi**l*w*r* *lin*ly *ollow** Lo**tion *****rs