{"id":"CVE-2024-1968","published":"2024-05-20T08:03:43Z","modified":"2024-08-01T18:56:22Z","title":"Authorization Header Leakage in scrapy/scrapy on Scheme Change Redirects","vendor":"scrapy","product":"scrapy/scrapy","tier":"tail","description":{"text":"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.","provenance":"source","from":"CVE.org"},"cvss":{"score":7.5,"severity":"HIGH","version":"3.0","vector":"CVSS:3.0/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:N/A:N","provenance":"source","from":"CVE.org CNA"},"epss":{"score":0.00688,"percentile":0.53636,"provenance":"source"},"cwes":[{"id":"CWE-200","name":"Exposure of Sensitive Information to an Unauthorized Actor"}],"references":[{"url":"https://huntr.com/bounties/27f6a021-a891-446a-ada5-0226d619dd1a","tags":[]},{"url":"https://github.com/scrapy/scrapy/commit/1d0502f25bbe55a22899af915623fda1aaeb9dd8","tags":[]}],"priority":{"score":16.0,"factors":[{"name":"EPSS percentile","points":10.73},{"name":"CVSS severity","points":5.25}]},"vendorSlug":"scrapy","affectedVersions":[{"vendor":"scrapy","product":"scrapy/scrapy","versions":[">= unspecified, < 2.11.2"]}],"ssvc":{"exploitation":"poc","automatable":"yes","technicalImpact":"partial","timestamp":"2024-06-18T20:26:27.498015Z","from":"CISA ADP","provenance":"source"},"affected":[{"ecosystem":"PyPI","package":"Scrapy","vulnerableRanges":["<2.11.2","<2.0.0",">=2.0.0, <2.11.2"],"patched":["2.11.2","2.0.0"],"from":["GHSA-4qqq-9vqf-3h3f","PYSEC-2024-258"],"provenance":"source"}],"summary":{"text":"The flaw is in scrapy/scrapy's redirect middleware, specifically the _build_redirect_request function, which fails to strip the Authorization header when a redirect changes only the scheme (such as HTTPS to HTTP) while staying on the same domain. An attacker positioned to observe the traffic, with no authentication and no user interaction required, can cause the Authorization header to be sent in plaintext after such a downgrade redirect, exposing sensitive credentials to unauthorized parties.","provenance":"ai","model":"claude-haiku-5-5","generatedAt":"2026-11-20T21:26:07Z"},"euvd":{"id":"EUVD-2024-1419","exploited":false,"provenance":"source"},"lineage":{"familyId":"fam-scrapy-scrapy-cve-2022-0577","parents":[{"from":"CVE-2022-0577","to":"CVE-2024-1968","relation":"related","confidence":"medium","kind":"lineage","evidence":[{"kind":"same-code","provenance":"machine","files":["scrapy/downloadermiddlewares/redirect.py"],"commits":["https://github.com/scrapy/scrapy/commit/8ce01b3b76d4634f55067d6cfdf632ec70ba304a","https://github.com/scrapy/scrapy/commit/1d0502f25bbe55a22899af915623fda1aaeb9dd8"],"basis":"rarely changed file"}]},{"from":"CVE-2024-3574","to":"CVE-2024-1968","relation":"related","confidence":"medium","kind":"lineage","evidence":[{"kind":"same-code","provenance":"machine","files":["scrapy/downloadermiddlewares/redirect.py"],"commits":["https://github.com/scrapy/scrapy/commit/1d0502f25bbe55a22899af915623fda1aaeb9dd8","https://github.com/scrapy/scrapy/commit/5bcb8fd5019c72d05c4a96da78a7fcb6ecb55b75","https://github.com/scrapy/scrapy/commit/ee7bd9d217fc126063575d5649f00bdeeca2faae"],"basis":"shared function","functions":["_build_redirect_request"]}]}],"packageHistory":[{"cve":"CVE-2021-41125","published":"2021-10-06","fixed":"2.5.1","kev":false},{"cve":"CVE-2024-1968","published":"2024-05-20","fixed":"2.11.2","kev":false},{"cve":"CVE-2025-6176","published":"2025-10-31","fixed":"2.13.4","kev":false,"link":{"from":"CVE-2024-1968","to":"CVE-2025-6176","relation":"successor","confidence":"low","kind":"sequence","evidence":[{"kind":"version-step","provenance":"source","package":"PyPI:Scrapy","fromFixed":"2.11.2","toFixed":"2.13.4","daysApart":529}]}},{"cve":"CVE-2026-105782","published":"2026-10-05","fixed":"2.14.2","kev":false}],"package":"PyPI:Scrapy"}}