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.
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
| Ecosystem | Package | Fixed in | Advisory |
|---|---|---|---|
| Debian:12 | python-scrapy | no fix listed | DEBIAN-CVE-2024-1968 |
| Debian:13 | python-scrapy | 2.11.2-1 | DEBIAN-CVE-2024-1968 |
| Debian:14 | python-scrapy | 2.11.2-1 | DEBIAN-CVE-2024-1968 |
| PyPI | scrapy | 2.11.2 | GHSA-4qqq-9vqf-3h3f |
| PyPI | scrapy | 2.0.0, 2.11.2 | PYSEC-2024-258 |
Affected products (as reported)
| Vendor | Product | Versions |
|---|---|---|
| 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