Medusa 2.0.0 до 2.22.5 содержит прототип уязвимости загрязнения в remoteQueryObjectFromString() в packages/core/utils/src/common/remote-query-object-from-string.ts, который проходит каждый разделенный точкой сегмент запрашиваемого поля с оператором ???, не отвергая __proto__, конструктор или прототип, поэтому такой путь, как constructor.prototype.constructor.prototype.polluted достигает Object.prototype и создает на нём общий массив полей поля. Неавторизованные злоумышленники могут отправлять параметры запросов в Store API маршруты, такие как /store/regions в релизах до 2.21.0, а аутентифицированные пользователи могут делать то же самое через Admin API маршруты до 2.22.5, повреждая выбор поля отношений всех последующих запросов и ухудшая ответы API до перезапуска процесса сервера.
Показать оригинальное описание (EN)
Medusa 2.0.0 before 2.22.5 contains a prototype pollution vulnerability in remoteQueryObjectFromString() in packages/core/utils/src/common/remote-query-object-from-string.ts that walks each dot-separated segment of a requested field with the ??= operator without rejecting __proto__, constructor or prototype, so a path such as constructor.prototype.constructor.prototype.polluted reaches Object.prototype and creates a shared fields array on it. Unauthenticated attackers can send a crafted fields query parameter to Store API routes such as /store/regions in releases before 2.21.0, and authenticated users can do the same through Admin API routes until 2.22.5, corrupting the relation field selections of all subsequent queries and degrading API responses until the server process restarts.
Характеристики атаки
Последствия
Строка CVSS v4.0