Vulnerability · Published May 20, 2024 · Assigned by @huntr_ai

CVE-2024-1968Authorization Header Leakage in scrapy/scrapy on Scheme Change Redirects

High 7.5

In plain English

A high-severity information exposure in scrapy/scrapy from scrapy. Proof-of-concept exploit code is public. The chance it is exploited in the next 30 days is estimated at 0.7% (higher than 53% of all known vulnerabilities). Fixed versions are available - upgrade the affected package.

Severity (CVSS 3.0)7.5High
Exploit odds (30 days)0.7%top 47.1% of all CVEs
Exploited in the wildNo reportsCISA SSVC: poc
Attack toolingNoneno public tooling known

Official description

In scrapy/scrapy, an issue was identified where the Authorization header is not removed during redirects that only change the scheme (e.g., HTTPS to HTTP) but remain within the same domain. This behavior contravenes the Fetch standard, which mandates the removal of Authorization headers in cross-origin requests when the scheme, host, or port changes. Consequently, when a redirect downgrades from HTTPS to HTTP, the Authorization header may be inadvertently exposed in plaintext, leading to potential sensitive information disclosure to unauthorized actors. The flaw is located in the _build_redirect_request function of the redirect middleware.

Affected packages & fixed versions

EcosystemPackageFixed inAdvisory
Debian:12python-scrapyno fix listedDEBIAN-CVE-2024-1968
Debian:13python-scrapy2.11.2-1DEBIAN-CVE-2024-1968
Debian:14python-scrapy2.11.2-1DEBIAN-CVE-2024-1968
PyPIscrapy2.11.2GHSA-4qqq-9vqf-3h3f
PyPIscrapy2.0.0, 2.11.2PYSEC-2024-258

Affected products (as reported)

VendorProductVersions
scrapy scrapy/scrapy unspecified – before 2.11.2

Weakness: CWE-200 · Vector: CVSS:3.0/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:N/A:N

References