Уязвимость Server-Side Request Forgery (SSRF в ex-aws ex_aws позволяет злоумышленнику, который контролирует имя ведра S3, отправлять подписанные запросы S3 на хост по своему выбору. С virtual_host: правда, ExAws.Operation.S3.add_bucket_to_path/2 в lib/ex_aws/operation/s3.ex строит имя хоста запроса из имени ведра и настроенного хоста без проверки имени ведра. Ведро, такое как attacker.example/x?, превращает запрос URL в https://attacker.example/x?.s3.amazonaws.com/key, поэтому запрос подписывается и отправляется attacker.example.
Злоумышленник получает тела загрузки, идентификатор ключа доступа и подпись запроса, а также любой токен сеанса STS и контролирует ответ, который анализирует приложение. В bucket_as_host: верно, что ведро - это все имя хоста, поэтому любое действительное имя хоста перенаправляет запрос. Эта проблема затрагивает ex_aws: от 2.1.7 до 2.8.0.
Показать оригинальное описание (EN)
Server-Side Request Forgery (SSRF) vulnerability in ex-aws ex_aws allows an attacker who controls an S3 bucket name to send the application's signed S3 requests to a host of their choice. With virtual_host: true, ExAws.Operation.S3.add_bucket_to_path/2 in lib/ex_aws/operation/s3.ex builds the request hostname from the bucket name and the configured host without checking the bucket name. A bucket such as attacker.example/x? turns the request URL into https://attacker.example/x?.s3.amazonaws.com/key, so the request is signed for and sent to attacker.example. The attacker receives upload bodies, the access key id and request signature, and any STS session token, and controls the response the application parses. With bucket_as_host: true the bucket is the whole hostname, so any valid hostname redirects the request. This issue affects ex_aws: from 2.1.7 before 2.8.0.
Характеристики атаки
Последствия
Строка CVSS v4.0