GHSA-76g3-c3x4-crvx: High severity pip/scrapy vulnerability

Published Sep 2, 2026
·
Updated

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["issecure"] 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:

python scheme = "https" if request.meta.get("issecure") else "http" url = f"{scheme}://{bucket}.s3.amazonaws.com{path}"

The request is then signed and dispatched:

python self.signer.addauth(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:

text 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.

Affected Software

1 affected componentFixes available
pip/scrapy<2.17.0
2.17

Remediation

Recommended actions to resolve this vulnerability, in priority order.

  1. Upgrade

    Upgrade pip/scrapy to a version that resolves this vulnerability.

    Fixed in 2.17
  2. Configuration

    When making Scrapy s3:// requests that use AWS credentials, explicitly set request.meta["is_secure"] = True so S3DownloadHandler uses HTTPS instead of plaintext HTTP (it sets scheme = "https" if request.meta.get("is_secure") else "http").

    Scrapy S3DownloadHandler (scrapy/core/downloader/handlers/s3.py) request.meta['is_secure'] = True
  3. Compensating control

    Ensure network attackers cannot observe or modify traffic between Scrapy and S3 (e.g., place Scrapy and AWS access behind TLS/secure network paths and prevent MITM opportunities on the network path).

Event History

Sep 2, 2026
Advisory Published
via GitHub·10:50 PM
Data Sourced
via GitHub·10:50 PM
DescriptionSeverityWeaknessAffected Software

Frequently Asked Questions

1

Are default Scrapy S3 requests affected?

Yes. S3DownloadHandler uses HTTP unless request.meta["is_secure"] is explicitly set, so ordinary s3://bucket/key requests are sent without TLS by default.

2

Who can exploit this issue?

An attacker must be able to observe or intercept traffic between the Scrapy process and S3. Examples include an attacker on public Wi-Fi, a compromised router, an ISP or corporate network observer, or a local attacker performing ARP spoofing.

3

What information can be exposed?

A network observer can read the bucket and key path, AWS Authorization header, X-Amz-Security-Token when temporary credentials are used, S3 object contents, and S3 response headers. An active man-in-the-middle attacker can also modify traffic.

4

What can be done before patching?

Explicitly set request.meta["is_secure"] so that S3 requests use HTTPS rather than HTTP. This is particularly important for s3:// requests made with configured AWS credentials.

Contact

SecAlerts Pty Ltd.
132 Wickham Terrace
Fortitude Valley,
QLD 4006, Australia
info@secalerts.co
By using SecAlerts services, you agree to our services end-user license agreement. This website is safeguarded by reCAPTCHA and governed by the Google Privacy Policy and Terms of Service. All names, logos, and brands of products are owned by their respective owners, and any usage of these names, logos, and brands for identification purposes only does not imply endorsement. If you possess any content that requires removal, please get in touch with us.
© 2026 SecAlerts Pty Ltd.
ABN: 70 645 966 203, ACN: 645 966 203