CVE-2024-1968
MEDIUM5.9EPSS 0.19%Scrapy leaks the authorization header on same-domain but cross-origin redirects
Description
### Impact Since version 2.11.1, Scrapy drops the `Authorization` header when a request is redirected to a different domain. However, it keeps the header if the domain remains the same but the scheme (http/https) or the port change, all scenarios where the header should also be dropped. In the context of a man-in-the-middle attack, this could be used to get access to the value of that `Authorization` header ### Patches Upgrade to Scrapy 2.11.2. ### Workarounds There is no easy workaround for unpatched versions of Scrapy. You can replace the built-in redirect middlewares with custom ones patched for this issue, but you have to patch them yourself, manually. ### References This security issue was reported and fixed by @szarny at https://huntr.com/bounties/27f6a021-a891-446a-ada5-0226d619dd1a/.
Affected packages (3)
- Debian/python-scrapyfrom 0
- PyPI/scrapyfrom 0, < 2.11.2
- PyPI/scrapyfrom 0, < 1d0502f25bbe55a22899af915623fda1aaeb9dd8 | from 0, < 2.0.0, >= 2.0.0, < 2.11.2
CVSS scores
| Source | Version | Severity | Vector |
|---|---|---|---|
| osv | CVSS 3.1 | MEDIUM5.9 | CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:H/I:N/A:N |
References (5)
- ADVISORYhttps://security-tracker.debian.org/tracker/CVE-2024-1968
- PATCHhttps://github.com/scrapy/scrapy
- WEBhttps://github.com/scrapy/scrapy/commit/1d0502f25bbe55a22899af915623fda1aaeb9dd8
- WEBhttps://github.com/scrapy/scrapy/security/advisories/GHSA-4qqq-9vqf-3h3f
- WEBhttps://huntr.com/bounties/27f6a021-a891-446a-ada5-0226d619dd1a