Know every vulnerabilitybefore it knows you.
DevGuard continuously monitors your dependencies and alerts you when CVEs like this one affect your stack — with real-time threat intelligence built for developers.
GHSA-76g3-c3x4-crvx
Problem
Scrapy’s S3DownloadHandler sends signed S3 requests over plaintext HTTP by default.
A normal request like s3://bucket/key is converted into http://bucket.s3.amazonaws.com/key unless request.meta["is_secure"] is explicitly set. The generated request is then signed with configured AWS credentials, so AWS authorization material can be sent without TLS.
Vulnerable code in scrapy/core/downloader/handlers/s3.py:
scheme = "https" if request.meta.get("is_secure") else "http"
url = f"{scheme}://{bucket}.s3.amazonaws.com{path}"
The request is then signed and dispatched:
self._signer.add_auth(awsrequest)
request = request.replace(url=url, headers=awsrequest.headers.items())
Impact
Users making Scrapy s3:// requests with AWS credentials are impacted.
A network attacker able to observe traffic between Scrapy and S3, such as a public Wi-Fi attacker, compromised router, ISP/corporate network observer, or local network attacker using ARP spoofing, can read:
bucket/key path
AWS Authorization header
X-Amz-Security-Token, if temporary credentials are used
S3 object contents
S3 response headers
An active MITM attacker can also modify the plaintext S3 response body, status code, and headers before Scrapy processes it. This can cause scraped data poisoning, poisoned exports, HTTP cache poisoning when cache is enabled, and influence over later crawl targets through forged redirects or attacker-controlled links.
Suggested classification: CWE-319: Cleartext Transmission of Sensitive Information.
PoC
A minimal PoC creates an s3:// request, enables fake AWS settings, captures the request produced by S3DownloadHandler, and prints the rewritten URL and auth headers.
Upload your own SBOM in CycloneDX 1.6 or higher (JSON) directly here to check your vulnerabilities.
Drag and drop some file here, or click to select
The vulnerability can be exploited over the network without needing physical access. It is difficult for an attacker to exploit this vulnerability and may require special conditions. An attacker does not need any special privileges or access rights. No user interaction is needed for the attacker to exploit this vulnerability. The impact is confined to the system where the vulnerability exists. There is a high impact on the confidentiality of the information. There is a high impact on the integrity of the data.
Exploitation attempts have been detected. Elevated vigilance and prompt remediation are advised.
The exploit probability is very low. The vulnerability is unlikely to be exploited in the next 30 days.
We did not find any exploit available. Neither in GitHub repositories nor in the Exploit-Database.
Browse More
Continuously monitor your dependencies and get alerted when vulnerabilities like this one affect your stack.
Checkout DevGuard