Vulnerability PYSEC-2026-1908

High Risk
HIGH RISK
CVSS Score: 7.5
Score Range: 7.0–8.9
High severity vulnerabilities (CVSS 7.0–8.9). Serious vulnerabilities that should be prioritized soon after critical fixes.
3 months ago
July 07, 2026 at 11:45 AM UTC
Scrapy authorization header leakage on cross-domain redirect
0.7 - 1.8.3 and 2.0.0 - 2.11.0
0.7 - 1.8.3 and 2.0.0 - 2.11.0

Summary

Scrapy authorization header leakage on cross-domain redirect

Details

Impact

When you send a request with the Authorization header to one domain, and the response asks to redirect to a different domain, Scrapy’s built-in redirect middleware creates a follow-up redirect request that keeps the original Authorization header, leaking its content to that second domain.

The right behavior would be to drop the Authorization header instead, in this scenario.

Patches

Upgrade to Scrapy 2.11.1.

If you are using Scrapy 1.8 or a lower version, and upgrading to Scrapy 2.11.1 is not an option, you may upgrade to Scrapy 1.8.4 instead.

Workarounds

If you cannot upgrade, make sure that you are not using the Authentication header, either directly or through some third-party plugin.

If you need to use that header in some requests, add "dont_redirect": True to the request.meta dictionary of those requests to disable following redirects for them.

If you need to keep (same domain) redirect support on those requests, make sure you trust the target website not to redirect your requests to a different domain.

Acknowledgements

This security issue was reported by @ranjit-git through huntr.com.

Impacted packages

Timeline

Published
3 months ago
July 07, 2026 at 11:45 AM UTC
Fixed (1.8.4)
2 years ago
February 14, 2024 at 07:05 PM UTC
Fixed (2.11.1)
2 years ago
February 14, 2024 at 07:05 PM UTC
Last Modified
3 months ago
July 07, 2026 at 05:47 PM UTC