# OrderListInitial leaks order details

A staff account with only Customer permission could query extra fields on the OrderListInitial GraphQL operation and read full order details it should not access.

- Payout: $1,500
- Severity: medium
- Program: Shopify
- Found by: sreeju_kc
- Disclosed: 2020-08-18
- Write-up quality: 6/10
- Original: https://hackerone.com/reports/882412
- Library page: https://bugbountylibrary.com/r/h1%3A882412
- Tags: area:web domain:web impact:data-leak kind:bounty platform:hackerone sev:medium tech:graphql technique:source-review vuln:access-control vuln:info-disclosure

**Target:** Shopify admin internal GraphQL endpoint /admin/internal/web/graphql/core, OrderListInitial operation
**Root cause:** The OrderListInitial GraphQL resolver returned order node fields without enforcing per-field authorization, so a staff member lacking Order permission could request sensitive order fields and receive them.
**Steps:**
1. Create products, a customer, and orders in a store.
2. Add a staff member with only the 'Customer' permission.
3. Send `POST /admin/internal/web/graphql/core` with `operationName: OrderListInitial` and the `ordersAll: orders(first: 1, reverse: true)` selection.
4. Add extra fields to the order node: `email`, `phone`, `clientIp`, `displayFinancialStatus`, `paymentGatewayNames`, `note`, `discountCode`, `createdAt`, etc.
5. Observe the response returns those order fields despite the staff lacking Order permission.
**How found:** Researcher noticed the OrderListInitial operation returned an order id for a Customer-only staff account, hypothesized the resolver lacked field-level authorization, and manually added extra order fields to the query to confirm they were returned.
**Exploitation:** An authenticated low-privilege staff account (Customer-only) issues the OrderListInitial GraphQL query with an expanded field selection on the orders connection, receiving order metadata (status, payment gateways, timestamps, flags) that should require Order permission.
**Insight:** When a GraphQL operation returns an object id to a low-privilege user, try expanding the field selection on that node — per-field authorization is often missing even when the top-level query is permitted.

## Proof of concept (copied exactly from the original report)

**Leaked order response with email, phone, clientIp, note**

```
"ordersAll":{"edges":[{"node":{"id":"gid:\/\/shopify\/Order\/1936560029718","
billingAddressMatchesShippingAddress":false,
"canMarkAsPaid":true,
"capturable":false,
"clientIp":null,
"createdAt":"2020-05-24T21:13:29Z",
"discountCode":null,
"displayFinancialStatus":"PENDING",
"displayFulfillmentStatus":"UNFULFILLED",
"edited":false,
"email":null,
"fulfillable":true,
"fullyPaid":false,
"merchantEditable":false,
"name":"#1006#",
"note":null,
"paymentGatewayNames":["Test"],
"phone":null,
"refundable":false,
"requiresShipping":true,
"restockable":true,
"unpaid":false,"__typename":"Order"},"__typename":"OrderEdge"}],"__typename":"OrderConnection"}
```

