Bypassing Password Reuse Restriction A Security Flaw.
The password change function relied on a client-supplied boolean parameter to enforce a password reuse restriction, and the server did not independently validate that the new password differed from the old one. An attacker could bypass the restriction and set the password back to a previously used value.
When testing a password change functionality, I encountered an interesting feature implementation and discovered a potential vulnerability. Here’s a breakdown of what happened-
The full write-up lives on its author's site
It belongs to its author, so we link to it rather than copy it. The other two tabs are our own rewrites, checked against it.
Not written yet. The AI write-up for this write-up has not been written yet. The Original tab links to the source.
How it worked
Root cause
Likely the server trusted a client-supplied parameter to decide whether to enforce the password reuse check, instead of performing the comparison itself.
Impact
The password reuse restriction could be bypassed, allowing a user to set their password back to a previously used value.
What the attacker needed
Authenticated user; ability to intercept and modify requests
The fix
The server should independently verify that the new password differs from the old one, regardless of client-side parameters, and should not rely on client-side response tampering.
How it was found
- Intercept the password change request with both old and new passwords set to the same value.
- Notice the mustBediffrent parameter set to true.
- Change the mustBediffrent parameter to false and forward the request.
- Intercept the 400 Bad Request response and manually change the status code to 200 OK.
- Forward the modified response to the client.
- Observe that the password change succeeded and the old password can still be used to log in.
Explained by bugbounty.wiki with AI from the original and checked against quotes from it; it can still be wrong. Read the original before relying on a detail.
Not written yet. The AI write-up for this write-up has not been written yet. The Original tab links to the source.
When you change your password, the website should check on its own servers that the new password is not the same as the old one. Here, the website trusted a value sent by the browser to decide whether to run that check. By changing that value, the tester made the website accept the old password again.
What is Business logic?
The application works as coded but not as intended: a negative price, a skipped payment step, a limit that can be crossed.