# CVE-2024-1968: PYSEC-2024-258 - In scrapy/scrapy, an issue was identified where the Authorization header is not removed during redirects that only change the scheme (e.g.

Source: https://junglewise.ai/threats/cve-2024-1968-scrapy-leaks-the-authorization-header-on-same-domain-but-cross  
Publisher: Junglewise Threat Intelligence, https://junglewise.ai/threats  
Published: 2024-05-20  
License: CC BY 4.0 with a link back

CVE-2024-1968 · Severity: low · CVSS 3.1 · Published 2024-05-20

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.

Technologies: [scrapy (PyPI)](https://junglewise.ai/threats/technologies/scrapy). Vendors: [PyPI](https://junglewise.ai/threats/vendors/pypi).

## Quick answers

**Is CVE-2024-1968 exploited in the wild?** No. Junglewise Threat Intelligence has no report of CVE-2024-1968 being exploited in the wild.

**How severe is CVE-2024-1968?** Low severity, with a CVSS score of 3.1, published 20 May 2024.

**Which products and versions are affected?** scrapy (PyPI) ECOSYSTEM:introduced=0,fixed=2.11.2, GIT:introduced=0,fixed=1d0502f25bbe55a22899af915623fda1aaeb9dd8|ECOSYSTEM:introduced=0,fixed=2.0.0,introduced=2.0.0,fixed=2.11.2.

**Is there a fix for CVE-2024-1968?** Yes. scrapy (PyPI): upgrade to 2.11.2 or later. Junglewise finds every place you run it, drafts the upgrade and applies it once you approve.

**Am I affected by CVE-2024-1968?** Check whether you run scrapy (PyPI) at an affected version. Junglewise does that check for you around the clock: connect your code, cloud and domains, and it matches new vulnerabilities like this one against what you actually run and tells you when one reaches you.

## How to fix

- scrapy (PyPI): upgrade to 2.11.2 or later

  ```sh
  pip install "scrapy>=2.11.2"
  ```


## Affected products

- scrapy (PyPI) ECOSYSTEM:introduced=0,fixed=2.11.2, GIT:introduced=0,fixed=1d0502f25bbe55a22899af915623fda1aaeb9dd8|ECOSYSTEM:introduced=0,fixed=2.0.0,introduced=2.0.0,fixed=2.11.2

## Identifiers

- CVE-2024-1968
- GHSA-4qqq-9vqf-3h3f
- PYSEC-2024-258

## Related threats

- [Scrapy arbitrary code execution via Referrer-Policy header](https://junglewise.ai/threats/cve-2026-105782-scrapy-arbitrary-module-import-via-referrer-policy-header-in)
- [Scrapy S3DownloadHandler cleartext transmission of AWS credentials](https://junglewise.ai/threats/cve-2026-84366-scrapy-s3downloadhandler-cleartext-transmission-of-aws)
- [PYSEC-2026-2401 - Scrapy is vulnerable to a denial of service (DoS) attack due to flaws in brotli decompression implementation](https://junglewise.ai/threats/cve-2025-6176-scrapy-denial-of-service-via-brotli-decompression-bomb)
- [PYSEC-2026-1907 - Scrapy decompression bomb vulnerability](https://junglewise.ai/threats/cve-2024-3572-scrapy-decompression-bomb-vulnerability)
- [PYSEC-2026-1908 - Scrapy authorization header leakage on cross-domain redirect](https://junglewise.ai/threats/cve-2024-3574-scrapy-authorization-header-leakage-on-cross-domain-redirect)
