# IDOR on GraphQL queries BillingDocumentDownload and BillDetails

IDOR on BillingInvoice ID in Shopify admin GraphQL BillDetails and BillingDocumentDownload leaked other merchants' email, address, invoice PDF, and card last-4.

- Payout: $5,000
- Severity: medium
- Program: Shopify
- Found by: blaklis
- Disclosed: 2024-02-08
- Write-up quality: 7/10
- Original: https://hackerone.com/reports/2207248
- Library page: https://bugbountylibrary.com/r/h1%3A2207248
- Tags: area:web domain:api domain:web impact:data-leak impact:pii-leak kind:bounty platform:hackerone sev:medium tech:graphql technique:recon vuln:access-control vuln:idor

**Target:** admin.shopify.com GraphQL operations BillDetails and BillingDocumentDownload (BillingInvoice node)
**Root cause:** BillingInvoice node lookup by global ID lacked authorization check tying the invoice to the requesting shop, so any authenticated merchant could query arbitrary invoice IDs.
**Steps:**
1. Authenticate to admin.shopify.com as any merchant and capture session cookie + X-Csrf-Token.
2. Send `POST /api/shopify/...?operation=BillDetails&type=query` with `{"operationName":"BillDetails","variables":{"id":"<victim_invoice_id>",...}}` and the full query requesting node(id) ... on BillingInvoice fields.
3. Observe response contains victim shop domain, email, address, payment method last-4/brand or PayPal email, and invoice contents.
4. Send `POST ...?operation=BillingDocumentDownload&type=mutation` with `{"variables":{"id":"<victim_invoice_id>","documentType":"CREDIT_NOTE"}}` to enqueue PDF generation.
5. Fetch `https://admin.shopify.com/store/<yourshop>/invoices/<id>/download.html?document_type=INVOICE` to retrieve victim's invoice PDF.
**How found:** Researcher noticed the BillingInvoice id was numeric/incremental and tested an ID not belonging to their shop, observing foreign customer data returned.
**Exploitation:** Any authenticated merchant enumerates incremental BillingInvoice IDs and issues the two GraphQL operations to dump PII and download invoice PDFs for arbitrary shops; no special privileges required.
**Escalation:** Incremental/predictable IDs allow mass enumeration across all merchants, turning single-record IDOR into bulk PII dump.
**Insight:** GraphQL `node(id:)` global-ID lookups are a recurring IDOR surface: when a schema exposes a `node(id: ID!)` resolver, test whether the resolver enforces ownership rather than just object existence, especially for billing/financial node types.

