Authorization disclaimer. This walkthrough is limited to the intentionally vulnerable PortSwigger Web Security Academy lab linked below. Test only systems you own or are explicitly authorized to assess.
Overview
The reset workflow accepts a valid reset page but does not reliably bind the submitted new password to the account that requested the reset.

Lab objective/setup
The supplied credentials, candidate lists, email client, and exploit server are used only inside this Academy instance to reproduce the authentication-flow evidence shown below.
What I observed
The final reset request carries both a valid token and a separate username body field. Changing that field from Wiener to Carlos while retaining Wiener’s token resets Carlos’s password.


Why it is vulnerable
A reset token must be tied server-side to one account, purpose, and expiry; user-controlled identity fields cannot decide the reset target.
Walkthrough in the authorized PortSwigger lab
Request and open a reset link for Wiener, intercept the final password submission, change only username=wiener to username=carlos, and submit. The redirect is followed by a successful Carlos login with the chosen password.




Verification
The final capture shows the Academy marking the password reset broken logic exercise as solved after the documented request sequence. No testing was performed outside the isolated lab.

Impact and defensive lesson
Authentication controls must bind identity, challenge state, reset tokens, and retry counters to server-side transactions. Return uniform failures, rate-limit by both account and trusted client signals, and use random revocable persistent-session tokens rather than credential-derived values.