Недостаточная уязвимость Protected Credentials в hackney in benoitc hackney позволяет серверу перенаправления получить basic_auth и cookie-учетные данные запроса через перенаправление того же хоста на другую схему или порт. С включенным follow_redirect, hackney:follow_redirect/10 в src/hackney.erl переиздает запрос к цели Location после hackney:maybe_strip_auth_on_redirect/3, который сравнивал только имя хоста текущего и перенаправления URL. Перенаправление с https на http на том же хосте возмущается заголовками Authorization и Cookie в чистом тексте, где злоумышленник на пути может прочитать их, а перенаправление на другой порт на том же хосте передало их в другую службу. location_trusted пересылает учетные данные любой цели по дизайну и остается неизменным.
Эта проблема затрагивает hackney: от 2.0.0 до 4.9.0.
Показать оригинальное описание (EN)
Insufficiently Protected Credentials vulnerability in hackney in benoitc hackney allows a redirecting server to obtain the basic_auth and cookie credentials of a request via a same-host redirect to another scheme or port. With follow_redirect enabled, hackney:follow_redirect/10 in src/hackney.erl reissues the request to the Location target after hackney:maybe_strip_auth_on_redirect/3, which compared only the hostname of the current and the redirect URL. A redirect from https to http on the same host resent the Authorization and Cookie headers in cleartext, where an on-path attacker can read them, and a redirect to another port on the same host handed them to a different service. location_trusted forwards credentials to any target by design and is unchanged. This issue affects hackney: from 2.0.0 before 4.9.0.
Характеристики атаки
Последствия
Строка CVSS v4.0