password less login token expiration issue
A passwordless login token generated via the Shopify iOS app remained valid even after the user revoked the app's access. An attacker who had obtained such a token could still log in and access the user's data.
- Triaged in 7 days
- Fixed in 14 days
- Paid in 20 days
- Disclosed after 20 days
-
Log into Shopify iOS app as Alice and grab the token.
-
Send the below request to generate the password less login token (The token expires after a single use. So don't use the token).
Request: POST /admin/api/graphql HTTP/1.1 Host: seclearn.myshopify.com Content-Type: application/graphql Connection: close X-Shopify-Access-Token: f263fb8c544a4cb965d63635a2e1c772 Accept: application/json User-Agent: Shopify Mobile/iPhone OS/5.0 (iPhone6,2/com.jadedpixel.shopify) Content-Length: 66 Accept-Language: en-us Accept-Encoding: gzip, deflate
mutation{adminPasswordlessLogin(input:{}){passwordlessLoginToken}}
Response: {"data":{"adminPasswordlessLogin":{"passwordlessLoginToken":"bd7ffa6c5bf2969fa15753f8fb8cb427-1475133135"}}}
-
From desktop browser, login as Alice and revoke access to Shopify iOS app. It is revoking the access token but password less login token still works.
Replace the above login token in the below URL and it logs you in. https://seclearn.myshopify.com/admin?login_token=bd7ffa6c5bf2969fa15753f8fb8cb427-1475133135
Attack scenario:
- User gave access to an app.
- App used the request and kept an unused login token.
- User revoked access to the app.
- App can still use the unused login token and access user's data.
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
An attacker who obtained an unused passwordless login token before revocation could still log in and access the user's data after the user revoked the app's access.
What the attacker needed
Attacker has access to the app's token; Attacker generates a passwordless login token; User revokes app access; Attacker uses the token before it expires
How it was found
- Log into the Shopify iOS app as Alice and obtain the access token.
- Send a GraphQL mutation to generate a passwordless login token without using it.
- From a desktop browser, log in as Alice and revoke access for the iOS app.
- Use the previously generated passwordless login token in the login URL to log in.
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.
When you give an app permission to access your account, you can later revoke that permission. This report shows that a special login link created by the app still worked after revocation, so someone who kept the link could still get in.
What is Account takeover?
Getting into someone else's account through a flaw in sign-in, password reset, second factor, single sign-on or session handling.