Skip to content
OpenAdvisories
High · 7.5 CVE-2024-1968 EUVD-2024-1419GHSA-4qqq-9vqf-3h3fPYSEC-2024-258

Authorization Header Leakage in scrapy/scrapy on Scheme Change Redirects

Published May 20, 2024 · Updated Aug 1, 2024 · Assigned by @huntr_ai

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 products

VendorProductAffectedFixed
scrapy scrapy/scrapy unspecified – < 2.11.2 2.11.2

Fixed in Linux distributions

Distributions backport fixes, so the version that fixes this vulnerability differs per release — upgrade to at least the version shown. From the distributions' security trackers and advisories.

ReleasePackageFixed inAdvisory
Debian 14 python-scrapy 2.11.2-1 —
Debian 13 python-scrapy 2.11.2-1 —
Debian 12 python-scrapy No fix yet —
ReleasePackageFixed inAdvisory
Ubuntu 16.04 LTS python-scrapy No fix yet —
Show 4 more (older releases, extended support, other products)
ReleasePackageFixed inAdvisory
Ubuntu Pro 24.04 LTS python-scrapy 2.11.1-1ubuntu0.1~esm2 USN-7476-1
Ubuntu Pro 22.04 LTS python-scrapy 2.5.1-2ubuntu0.1~esm1 USN-7476-1
Ubuntu Pro 20.04 LTS python-scrapy 1.7.3-1ubuntu0.1~esm1 USN-7476-1
Ubuntu Pro 18.04 LTS python-scrapy 1.5.0-1ubuntu0.1~esm1 USN-7476-1
ReleasePackageFixed inAdvisory
openSUSE Tumbleweed python-Scrapy 2.11.2-1.1 openSUSE-SU-2024:14130-1

Affected packages

EcosystemPackageAffectedFixedRecord
PyPI scrapy < 2.11.2 2.11.2 GHSA-4qqq-9vqf-3h3f
PyPI scrapy < 2.0.0 · >= 2.0.0, < 2.11.2 2.0.0, 2.11.2 PYSEC-2024-258

Advisories 2

References