Broken Reset Logic
Last updated
Was this helpful?
Last updated
Was this helpful?
This can lead to unauthorized account access or control, as attackers may exploit weaknesses in the reset procedure to gain access to user accounts.
Implement secure reset processes, such as token-based authentication with expiry times, validate token usage, enforce strong verification steps, and monitor and log reset activities for suspicious behavior.
The example below is based on PostSwigger's lab.
We first need to use the application as intented so we can understand how the reset functionality works (Figure 1).
On the above process (Figure 1), we notice that the final request includes the user's name but there is no check in place to validate if the token passed is tied to that specific username. For example, when setting a new password, it does not ask for the old password. As a result, we can use a new token in order to reset any other user's password (Figure 2).