CVE-2026-144440: Medusa 2.0.0 before 2.22.5 Prototype Pollution via Dotted Query Field Paths
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.
Affected Software
Remediation
Recommended actions to resolve this vulnerability, in priority order.
- Upgrade
Upgrade to a fixed release to a version that resolves this vulnerability.
Fixed in 2.22.5
Event History
Frequently Asked Questions
Which deployments are exposed to unauthenticated exploitation?
Releases before 2.21.0 expose affected Store API routes, including /store/regions, to unauthenticated attackers through a crafted fields query parameter. In versions from 2.21.0 through before 2.22.5, the affected Admin API route requires an authenticated user.
What does an attacker need to send to trigger the issue?
The attacker needs to supply a crafted dotted fields query path containing prototype-related segments, such as constructor.prototype.constructor.prototype.polluted. No user interaction is required.
What is the operational impact if exploitation succeeds?
The attack creates a shared fields array on Object.prototype, corrupting relation-field selections for subsequent queries. This can degrade API responses until the affected server process is restarted.
How can the condition be cleared if an immediate upgrade is not possible?
Restart the affected server process to clear the prototype pollution and restore subsequent query behavior. This only removes the in-memory corruption; it does not prevent another crafted request from triggering it again.