Skip to content
Race condition Write-up Intermediate

The Gap Between Check and Use: How a Race Condition Earned $15,250 from Shopify

A race condition in Shopify's partner email confirmation flow allowed an attacker to request access to a store using an email address they did not own, potentially gaining collaborator access to any store. The attacker could exploit the timing gap between checking a valid token and acting on the email address to have access granted to a victim's email.

T4nv1 Follow

Published on medium.com

Shopify lets store owners give outside help access to their shop, and partners (agencies, developers) can request access to a store through the Partners Dashboard. Access depends on identity: this email address belongs to this person, so this person may be added.

T4nv1, on medium.com

The full write-up lives on its author's site

It belongs to its author, so we link to it rather than copy it. The other two tabs are our own rewrites, checked against it.

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

How it worked

Root cause

Likely a check-then-act race condition where the system validated a token for one email but then re-read the current email address when granting access, allowing the email to be changed in between.

Impact

An attacker could gain collaborator access to any store whose employee email they know, potentially accessing products, orders, and customer data.

What the attacker needed

Knowledge of an employee email; ability to send concurrent requests; a Shopify partner account

The fix

Shopify fixed the issue by locking the database record during the relevant actions and requiring store administrators to approve all collaborator requests.

How it was found

  1. The attacker initiates a request to access a store using their own email and a valid confirmation token.
  2. Before the confirmation completes, the attacker sends a second request to change the email on the access request to the victim's email.
  3. The system checks the token (valid for the attacker's email) but then grants access to the current email on record, which is now the victim's email.
  4. The attacker gains collaborator access to the store associated with the victim's email.

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 write-up has not been written yet. The Original tab links to the source.

A race condition is a bug where the result depends on the timing of events. Here, the system checked that a confirmation token was valid for the attacker's email, but then, a moment later, it granted access to whatever email was on record at that time. An attacker could change the email in that tiny gap, so the system would grant access to someone else's email even though the token was only for the attacker's own email.

What is Race condition?

Parallel requests reach a state the code assumed could not happen: a coupon used twice, a limit overrun, a check skipped.

More by T4nv1

View all

113 more disclosed reports, best first.

Similar reports

View all

Same bug class and techniques, clearest first.

Race conditions

The lesson behind this report.

Parallel requests reach a state the code assumed could not happen: a coupon used twice, a limit overrun, a check skipped.