/

CVE-2026-24136

Severity:

HIGH RISK

(7.5)

Insecure Direct Object Reference (IDOR) in Saleor Order

CVE-2026-24136

Analyzed

Vulnerability type

Category:

Insecure Direct Object Reference (IDOR)

CWE:

CWE-639

Impact:

Sensitive Data Exposure / Privacy Violation

Severity:

HIGH RISK

(7.5)

CVSS version:

3.1

Catch this CVE while code is being written

Detect vulnerable code directly in pull requests, so CVEs are fixed before merge.

Summary

Saleor's order retrieval mechanism contains an Insecure Direct Object Reference (IDOR) issue that allows attackers to access order details they do not own via the order() GraphQL query.

In affected versions, unauthenticated or non-staff users may be able to exfiltrate sensitive information, including PII from orders created before Saleor 3.2.0, when they can guess or enumerate order identifiers.

Affected context

This vulnerability occurs in Saleor's order retrieval functionality exposed through the order() GraphQL query.

It affects deployments running:

  • Saleor 3.2.0 through 3.20.109
  • Saleor 3.21.0-a.0 through 3.21.44
  • Saleor 3.22.0-a.0 through 3.22.28

The risk is highest where:

  • Order identifiers are predictable or discoverable, and
  • The application allows non-staff or unauthenticated users to call the order lookup API.

Orders created before Saleor 3.2.0 are specifically called out as potentially leaking personally identifiable information (PII) in plain text.

Exploit preconditions

  • Attack surface: Public-facing GraphQL API, specifically the order() query endpoint.
  • Required access: Network access to the API; in some configurations, no authentication or only low-privileged/non-staff access is required.
  • Trigger point: Supplying identifiers (such as order IDs or tokens) for orders that belong to other customers to the order() query.
  • Why exploitation is possible: The API relies on object identifiers to fetch order records but does not consistently enforce proper authorization checks ensuring the requester owns or is authorized to view the referenced order. This is the essence of CWE-639: access control depends solely on user-controllable identifiers.

Why this happens

The core issue is an access control flaw where authorization is not tightly bound to the resource being accessed.

In an IDOR scenario, backend logic accepts a client-supplied identifier (e.g., order ID, token, or reference) and returns the corresponding object without validating that the requester is the legitimate owner or has sufficient privileges to view that resource.

For Saleor's order() GraphQL query, the system trusted the identifier and performed a direct lookup, but did not reliably check that the caller is authenticated as the customer associated with the order or as a staff member with appropriate privileges.

This pattern maps directly to CWE-639: Authorization Bypass Through User-Controlled Key, where the security decision is incorrectly based solely on a user-manipulable key instead of robust, server-enforced ownership and role checks.

Potential impact

  • Exposure of customers' personally identifiable information (PII) contained in historical orders.
  • Disclosure of order contents, including purchased items and pricing details, which can aid profiling or competitive intelligence.
  • Leakage of contact information such as names, addresses, phone numbers, and email addresses associated with older orders.
  • Potential regulatory and compliance impact (e.g., GDPR/CCPA) due to unauthorized exposure of customer data.
  • Erosion of customer trust and reputational damage due to privacy violations.

General mitigation guidance

Effective mitigation focuses on enforcing strict, server-side authorization checks around object access:

  • Ensure that any API handling order retrieval validates that the requesting user is either:
  • The authenticated customer associated with the order, or
  • A staff/admin account with explicit permission to view orders.
  • Bind resource access decisions to server-side known attributes (e.g., user session, customer ID) rather than relying only on user-supplied identifiers.
  • Use opaque, hard-to-guess identifiers or tokens for orders, separate from internal primary keys, and validate these tokens against the current user's identity.
  • Centralize authorization logic for object retrieval so that all orders-related queries and mutations pass through a consistent permission-checking layer.
  • Apply the principle of least privilege to ensure non-staff users have access only to their own orders and only to the minimal data necessary for customer workflows.
  • Consider data minimization for historical orders, reducing retention or masking sensitive fields that are not operationally required.

How teams detect issues like this

To detect and monitor for similar access control issues:

  • Static analysis and code review:
  • Search for GraphQL resolvers, REST handlers, or services that fetch orders by ID or token without an explicit ownership or permission check.
  • Flag patterns where database queries select order objects based solely on user-provided IDs without referencing the current authenticated user.
  • Review custom GraphQL schema and resolvers to ensure each resource-level resolver enforces authorization independent of client-side checks.
  • Security tests and tooling:
  • Incorporate authorization-focused tests in CI (e.g., automated tests that attempt to access other users' orders using captured or guessed IDs).
  • Use dynamic application security testing (DAST) tools to probe object access patterns and identify IDOR exposures.
  • Implement logging for access to order retrieval endpoints, capturing user identity, requested order ID, and outcome; periodically analyze logs for suspicious cross-user access attempts.
  • Policy and governance:
  • Establish coding standards that mandate ownership checks for all object retrieval by user-supplied identifiers.
  • Integrate API gateway or GraphQL middleware policies that enforce authentication and authorization for sensitive resource types such as orders.

Sources

SourceLink
github.comgithub.com/saleor/saleor/commit/5dab1857fbb2801f74e2bfe86f307e4590d9d2fa
github.comgithub.com/saleor/saleor/commit/718ce1b4fc3aef68eeac1aea0cf1d70a614ba6af
github.comgithub.com/saleor/saleor/commit/9bcd4f9000b189297eeb3ac88cc28c6c30229153
github.comgithub.com/saleor/saleor/commit/aeaced8acb5e01055eddec584263f77e517d5944
github.comgithub.com/saleor/saleor/security/advisories/GHSA-r6fj-f4r9-36gr

Frequently asked

questions

Yes. If the Saleor instance exposes the GraphQL API publicly and the order() query is accessible to unauthenticated or low-privileged users, an attacker with network access can attempt to exploit the flaw remotely.

Not necessarily. Exploitability depends on how the API is configured. In some deployments, unauthenticated users can reach the order() query. In others, a basic customer account may be sufficient to enumerate or guess other users' orders if authorization is not enforced per order.

The most robust fix is to enforce server-side authorization on every resource access. For orders, this means ensuring that each order retrieval checks that the current authenticated user is the owner of the order or has an appropriate staff role, and that no data is returned if this check fails.

Make authorization checks a first-class design concern: centralize permission logic, prohibit direct object lookups by raw user-supplied IDs without ownership checks, add automated tests specifically for cross-user access, and include access-control reviews in code review and security assessments. Opaque identifiers and least-privilege data exposure patterns further reduce the risk of sensitive data leaks.

Find out what's already
exploitable in your codebase.