# Account Takeover via Password Reset without user interactions

Sending user[email] as a JSON array in GitLab's password reset made the reset email go to both victim and attacker, enabling account takeover.

- Payout: $35,000
- Severity: critical
- Program: GitLab
- Found by: asterion04
- Disclosed: 2025-02-26
- Write-up quality: 7/10
- Original: https://hackerone.com/reports/2293343
- Library page: https://bugbountylibrary.com/r/h1%3A2293343
- Tags: area:web domain:web impact:ato kind:bounty platform:hackerone sev:critical tech:rest technique:param-pollution vuln:access-control vuln:account-takeover vuln:business-logic

**Target:** Password reset endpoint (Forgot Your Password) on gitlab.com
**Root cause:** The password reset handler accepted a JSON array for user[email] and processed all entries, sending the reset link to every address in the array instead of only the account's registered email.
**Steps:**
1. Go to 'Forgot Your Password?' and enter victim's email
2. Intercept the submit request in Burp Suite
3. Use Content-Type Converter BApp to convert the request body to JSON
4. Replace `"user[email]":"victim@gmail.com"` with `"user":{"email":["victim@gmail.com","attacker@gmail.com"]}`
5. Forward request; reset email is delivered to both addresses
6. Open the reset link received at attacker@gmail.com, set a new password, log in as victim
**How found:** Researcher converted the form-encoded reset request to JSON and tried supplying an array of emails, suspecting the backend would iterate over the array and send to all entries.
**Exploitation:** Attacker only needs the victim's email. By submitting the reset form with a JSON array containing both victim and attacker emails, the server emails the reset link to both. Attacker clicks the link from their own inbox, sets a new password, and logs in as the victim.
**Insight:** On password-reset forms, convert form-encoded bodies to JSON and try array/object shapes for the email field; backends that iterate over arrays will fan out the reset link to attacker-controlled addresses.

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

**JSON password reset payload with array of emails**

```
"user" {
     "email" [
              "victim@gmail.com",
              "attacker@gmail.com"
       ]
 },
```

