/

CVE-2026-84366

Severity:

HIGH RISK

(7.4)

Cleartext Transmission (CWE-319) in Scrapy S3 Handler

CVE-2026-84366

Deferred

Vulnerability type

Category:

Cleartext Transmission of Sensitive Information

CWE:

CWE-319

Impact:

Credential Disclosure, Data Exposure, and Man-in-the-Middle Manipulation

Severity:

HIGH RISK

(7.4)

CVSS version:

3.1

Catch this CVE while code is being written

Detect vulnerable code directly in pull requests, so CVEs are fixed before merge.

Summary

Scrapy's S3 download handler can send S3 requests over plaintext HTTP unless secure transport is explicitly enabled. A network observer may capture AWS credentials, object data, and response metadata, while an active man-in-the-middle attacker could alter responses and influence scraped results or later crawl behavior.

Affected context

The issue affects Scrapy deployments that use the S3 download handler with S3-scheme requests and configured AWS credentials. Risk is present when the handler constructs requests to S3 endpoints without secure transport enabled and network traffic can be observed or modified between the crawler and the storage service.

Exploit preconditions

  • Attack surface: Network communication between Scrapy and the S3 endpoint
  • Required access: Ability to observe or interfere with traffic, such as through a compromised network segment or active man-in-the-middle position
  • Trigger point: Processing an S3-scheme request through the S3 download handler without explicitly enabling secure transport
  • Why exploitation is possible: Credentials, object requests, and responses are transmitted without confidentiality or integrity protection

Why this happens

The vulnerability results from constructing a plaintext HTTP request for S3 resources unless a secure-transport option is explicitly enabled. This exposes authentication material and application data to the network and permits response tampering before Scrapy processes the result. The behavior maps to CWE-319: Cleartext Transmission of Sensitive Information, because confidential credentials and content are sent without appropriate transport encryption.

Potential impact

  • AWS access credentials or temporary session tokens may be disclosed
  • S3 object contents and response headers could be observed
  • Scraped data or exported datasets may be poisoned
  • HTTP caches may be poisoned when caching is enabled
  • Forged redirects or links could influence later crawl targets
  • Unauthorized access to other cloud resources may occur if exposed credentials have broader permissions

General mitigation guidance

Mitigation generally focuses on making encrypted transport the default for S3 communication and reducing the trust placed in network responses.

Common defensive patterns include:

  • Require HTTPS or equivalent authenticated transport for every S3 request
  • Use secure-by-default request construction that does not depend on an opt-in flag
  • Restrict AWS credentials to the minimum required buckets and operations
  • Prefer short-lived credentials and avoid exposing long-lived secrets to crawler processes
  • Validate redirects, links, status codes, and response metadata before using them in later crawl stages
  • Apply network policies that limit storage-service access to approved endpoints
  • Treat downloaded content as untrusted and validate exports before publication

These controls reduce both credential exposure and the effect of response manipulation.

How teams detect issues like this

Organizations can identify this class of issue through:

  • Static analysis and code review checks for S3 handlers that construct HTTP rather than HTTPS URLs
  • Searches for request paths where secure transport is opt-in or disabled by default
  • Runtime network monitoring for plaintext HTTP traffic involving storage endpoints
  • Egress policies that block unencrypted connections from crawler workloads
  • Tests that verify credentials and object requests are never transmitted over plaintext channels
  • Alerts for unexpected redirects, altered response metadata, or anomalous S3 access patterns

Automated review tools can help detect insecure URL construction and transport-security configuration gaps.

Sources

SourceLink
github.comgithub.com/scrapy/scrapy/commit/9523e1ec8c41fde265a26d14563d178b6f1ad04b
github.comgithub.com/scrapy/scrapy/releases/tag/2.17.0
github.comgithub.com/scrapy/scrapy/security/advisories/GHSA-76g3-c3x4-crvx

Frequently asked

questions

It can be exploitable by a network attacker who can observe or modify traffic between the Scrapy process and the S3 endpoint. It does not generally require direct access to the crawler host.

A passive attacker needs a position that permits traffic observation. An active attacker additionally needs the ability to intercept and alter the connection, such as through a compromised network or proxy.

Make encrypted, authenticated transport mandatory for all S3 requests and avoid relying on an explicit per-request opt-in for security.

Enforce HTTPS through application defaults and network policy, use least-privilege temporary credentials, test transport behavior in CI, and monitor for plaintext cloud-service traffic.

Find out what's already
exploitable in your codebase.