Логотип exploitDog
Консоль
Логотип exploitDog

exploitDog

github логотип

GHSA-4qqq-9vqf-3h3f

Опубликовано: 14 мая 2024
Источник: github
Github: Прошло ревью
CVSS3: 5.9

Описание

Scrapy leaks the authorization header on same-domain but cross-origin redirects

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/.

Пакеты

Наименование

Scrapy

pip
Затронутые версииВерсия исправления

< 2.11.2

2.11.2

EPSS

Процентиль: 41%
0.0019
Низкий

5.9 Medium

CVSS3

Дефекты

CWE-200

Связанные уязвимости

CVSS3: 7.5
ubuntu
больше 1 года назад

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.

CVSS3: 7.5
nvd
больше 1 года назад

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.

CVSS3: 7.5
debian
больше 1 года назад

In scrapy/scrapy, an issue was identified where the Authorization head ...

EPSS

Процентиль: 41%
0.0019
Низкий

5.9 Medium

CVSS3

Дефекты

CWE-200