Неправильная уязвимость авторизации в золе проекта позволяет клиенту читать записи назначения, не связанные с исходной записью, через сквозные отношения. Когда связь has_many, объявленная через:, была загружена для одной записи с пределом 1, или несортированная связь has_one была загружена с пределом 1, lateral_join?/4 в lib/ash/actions/read/relationships.ex выбрал путь, который читает назначение без какого-либо фильтра, связывающего его с источником. Нагрузка возвращала первую запись назначения сортировкой, или любую другую запись со смещением.
Чтение по-прежнему выполняет политики назначения, но имеет отношение как accessing_from, поэтому клиент, подающий такое поле (например, teachers(limit: 1, offset: n) через AshGraphql), может перечислять записи назначения, которые политики разрешают только при достижении через это отношение. Эта проблема затрагивает пепел: от 3.24.0 до 3.37.1.
Показать оригинальное описание (EN)
Incorrect Authorization vulnerability in ash-project ash allows a client to read destination records unrelated to the source record through a through relationship. When a has_many relationship declared with through: was loaded for a single record with a limit of 1, or an unsorted has_one through relationship was loaded with a limit of 1, lateral_join?/4 in lib/ash/actions/read/relationships.ex chose the path that reads the destination without any filter linking it to the source. The load returned the first destination record by sort, or any other record with an offset. The read still runs the destination's policies but carries the relationship as accessing_from, so a client paging such a field (for example teachers(limit: 1, offset: n) through AshGraphql) can enumerate destination records that policies allow only when reached through that relationship. This issue affects ash: from 3.24.0 before 3.37.1.
Характеристики атаки
Последствия
Строка CVSS v4.0