See how medusa compares to other vendors in security performance
Medusa 1.8.0 through 1.20.11 and 2.8.5 before 2.18.0 contains a prototype pollution vulnerability in buildOrder() (packages/core/utils/src/common/build-query.ts in 2.x) that splits each order key on dots and walks the segments without rejecting proto, constructor or prototype, so an order value of the form proto.<name> sets an attacker-named property on Object.prototype. In 2.8.5 through 2.17.x, prepareListQuery() passes the order query parameter to buildOrder(), so unauthenticated attackers can send one request with a crafted order parameter to Store API list endpoints that have no allowed-field list, such as /store/products, and the inherited property is then copied into later queries, for example by toRemoteQuery(), breaking API responses for all users until the server process restarts. The end-of-life 1.x line reaches the same code through buildQuery() from Admin API list endpoints and, in 1.20.x, from the unauthenticated /store/regions endpoint.
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.