# Ability to connect an external login service for unverified emails/accounts at accounts.shopify.com

Unverified Shopify accounts could link an external Google login, letting an attacker pre-register a victim's email and later hijack the account via OAuth.

- Payout: $1,600
- Severity: medium
- Program: Shopify
- Found by: saltymermaid
- Disclosed: 2022-04-13
- Write-up quality: 6/10
- Original: https://hackerone.com/reports/1018489
- Library page: https://bugbountylibrary.com/r/h1%3A1018489
- Tags: area:web domain:web impact:ato kind:bounty platform:hackerone sev:medium tech:oauth technique:chained vuln:auth-bypass

**Target:** accounts.shopify.com external-login endpoint /accounts/{id}/external-login/1
**Root cause:** The external-login connect endpoint did not enforce email verification, despite UI copy stating verification was required before connecting a login service.
**Steps:**
1. Create account at partners.myshopify.com using victim email `saltymermaid+victim@wearehackerone.com` (no verification).
2. Open profile at `https://accounts.shopify.com/accounts/{account_id}`.
3. Inject `<a href="/accounts/{victim_account_id}/external-login/1" data-method="post">Connect to Google</a>` via devtools console.
4. Click injected link, authenticate with attacker's Google account, get redirected to victim's account.
5. Observe external login added despite unverified email.
6. In another browser visit `https://partners.shopify.com/organizations`, enter victim email, see `Log in with Google` button confirming backdoor.
**How found:** Noticed UI text claiming email verification was required to connect an external login service, then tested the underlying endpoint directly via devtools to bypass the UI gate.
**Exploitation:** Attacker registers an account with a victim's email, then uses a crafted POST to the external-login endpoint to bind their own Google identity to that unverified account. Later the victim (or attacker) can authenticate via Google, giving the attacker persistent access to the account and any shops it joins.
**Escalation:** Backdoor account could later be used to access shops/organizations the victim associates with that email, leading to information disclosure.
**Insight:** When UI copy states a precondition (e.g. 'verify email first'), test the underlying endpoint directly — client-side gating often hides a missing server-side check on state-changing POSTs like OAuth linking.

## Proof of concept (copied exactly from the original report)

**Injected HTML link to connect external login**

```
add the following HTML snippet `<a href="/accounts/{victim_account_id}/external-login/1" data-method="post">Connect to Google</a>` and replace the **{victim_account_id}**
```

