# Orders full read for a staff with only `Customers` permissions.

Staff with only Customers permission read order numbers/emails via GraphQL HasEvents, then used Shopify Chat App order lookup to view full order details.

- Payout: $800
- Severity: low
- Program: Shopify
- Found by: scaramouche31
- Disclosed: 2022-02-10
- Write-up quality: 6/10
- Original: https://hackerone.com/reports/1392032
- Library page: https://bugbountylibrary.com/r/h1%3A1392032
- Tags: area:web domain:web impact:data-leak impact:pii-leak kind:bounty platform:hackerone sev:low tech:graphql technique:chained vuln:access-control vuln:info-disclosure

**Target:** Shopify admin internal GraphQL (node/HasEvents) + Shopify Chat App order-status flow
**Root cause:** The HasEvents GraphQL node exposes order confirmation event messages (containing order number and email) to staff lacking read_orders scope; the Chat App order-status lookup then accepts that order number without verifying the requester's order permissions.
**Steps:**
1. Create staff account with only Customers permission; install Shopify Chat App.
2. As that staff, POST to `/admin/internal/web/graphql/core` with `query MyQuery { node(id: "gid://shopify/Customer/<id>") { ... on HasEvents { events(first: 10) { edges { node { message } } } } } }`.
3. Read response message containing order link `#1001` and customer email.
4. Open storefront Chat App, ask order status, enter the leaked order number/email.
5. Follow generated link to view full order details.
6. Confirm scope enforcement by querying `node(id: "gid://shopify/Order/<id>") { ... on Order { id, totalPrice } }` which returns `Access denied ... read_orders`.
**How found:** Noticed HasEvents event messages leak order confirmation details despite read_orders being required for order fields; tested the leaked order number against the Chat App order-status lookup to confirm full order access.
**Exploitation:** Low-privileged staff enumerates customer IDs, extracts order numbers and emails from event messages, then feeds them into the Chat App order-status flow to retrieve full order data the admin API explicitly denies.
**Insight:** When a field is scope-gated, check adjacent event/activity/message objects on the same node—they often embed the protected data in human-readable strings that bypass field-level scope checks.

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

**GraphQL query leaking order number via customer events**

```
{
"query":"query MyQuery { node(id: \"gid://shopify/Customer/5639003504696\") { ... on HasEvents { events(first: 10) { edges { node { message } } } } } }"
}
```

**GraphQL query confirming read_orders denial on totalPrice**

```
{
"query":"query MyQuery { node(id: \"gid://shopify/Order/4287851397176\") { ... on Order { id, totalPrice } } }"
}
```

