# Account Takeover because of the mis-configuration on the Password Reset Page

No rate limit on password-reset verification-code endpoint allowed brute-forcing a 4-char alphanumeric code to take over any account given only the victim's email.

- Payout: $300
- Severity: medium
- Program: Clario
- Found by: karna__
- Disclosed: 2020-05-15
- Write-up quality: 6/10
- Original: https://hackerone.com/reports/767765
- Library page: https://bugbountylibrary.com/r/h1%3A767765
- Tags: area:web domain:api impact:ato kind:bounty platform:hackerone sev:medium vuln:auth-bypass vuln:business-logic

**Target:** api.account.opendoor.ltd password reset verification endpoint
**Root cause:** The POST /v1/verification-code/auth endpoint lacks rate limiting and uses a short 4-character alphanumeric verification code (36^4 = 1,679,616 possibilities), making brute force feasible.
**Steps:**
1. POST /v1/verification-code/forgot-password with `{"email":"victim@x","device_id":"helloworld"}` to trigger code generation
2. Send POST /v1/verification-code/auth with `{"code":"TEST","device_id":"helloworld"}` using same device_id
3. Brute force the `code` field with all 36^4 combinations (or ~1000 in demo) via Intruder with high thread count
4. Correct code returns 200 OK; wrong codes return 401 Unauthorized
5. Use the recovered code to reset the victim's password and take over the account
**How found:** Observed the verification code was only 4 characters of uppercase letters and digits, then noticed the auth endpoint returned distinct 200 vs 401 responses with no throttling, making brute force viable.
**Exploitation:** Attacker only needs victim's email. Trigger reset, then brute-force the 4-char code on the auth endpoint with no rate limit; correct code yields 200 and allows password reset, achieving account takeover.
**Insight:** When a reset flow uses a short code, check whether the verification endpoint distinguishes correct/incorrect responses and lacks per-device or per-IP rate limits; the device_id binding is not a defense if it's attacker-controlled.

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

**Forgot-password request with email and device_id**

```
POST /v1/verification-code/forgot-password` which will take POST data in the format 
{
"email": "koyogi9840@janmail.org",
"device_id": "helloworld"
}
```

**Verification code auth request with device_id**

```
POST /v1/verification-code/auth` where the user needs to enter the verification code sent to his email address so that he can reset his password. This endpoint accepts the data as `{"code": "TEST","device_id": "helloworld"}
```

