# Password reset endpoint is not brute force protected

Nextcloud's password reset token-check endpoint lacked brute-force throttling, letting an attacker guess reset tokens without rate limiting to hijack accounts.

- Payout: $500
- Severity: high
- Program: Nextcloud
- Found by: rullzer
- Disclosed: 2023-07-21
- CVE: CVE-2023-35172
- Write-up quality: 6/10
- Original: https://hackerone.com/reports/1987062
- Library page: https://bugbountylibrary.com/r/h1%3A1987062
- Tags: area:web domain:web impact:ato kind:bounty platform:hackerone sev:high tech:php technique:incomplete-fix technique:source-review vuln:account-takeover vuln:auth-bypass vuln:business-logic

**Target:** Nextcloud server core LostController password reset endpoint
**Root cause:** The lostpassword flow was annotated with brute-force protection everywhere except the endpoint that validates the reset token (LostController.php L226-229), so token guesses were never throttled.
**Steps:**
1. Identify the password reset token validation endpoint in core/Controller/LostController.php (L226-229).
2. Observe that other lostpassword endpoints carry brute-force protection annotations but this one does not.
3. Repeatedly submit guessed reset tokens to the endpoint; no throttling or lockout occurs.
4. On a correct guess, proceed to reset the victim's password.
**How found:** Reviewed the prior security advisory (GHSA-v243-x6jc-42mp) that added brute-force protection across the lostpassword flow, then code-read LostController.php and noticed the token-validation endpoint was the one endpoint left unannotated.
**Exploitation:** Attacker repeatedly submits candidate reset tokens to the unprotected validation endpoint without being rate-limited; a correct guess yields a valid reset token enabling account takeover.
**Insight:** After a fix adds rate limiting across a flow, audit each endpoint in that flow individually — the critical validation step is often the one missed, especially when protection is applied via per-method annotations rather than centrally.

