How i HACKED admin account via password reset IDOR function of one private currency exchanger site
The password reset link used a static hash that never changed across requests or accounts, so an attacker could reuse it to reset any user's password, including the admin's. The attacker could then log in as the victim.
Published on medium.com
One day, I was searching for a site to hunt for vulnerabilities when I came across one. I started testing, but on the first day, I didn’t find anything, and I was unable to create an account on the site.
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 password reset token was a fixed value shared across all accounts instead of a unique, random, per-user token.
Impact
An attacker could reset the password of any account, including the admin account, and take it over.
What the attacker needed
A free account; ability to receive email
The fix
The bug was fixed by the site, though the report does not describe the fix; it should use a unique, random, expiring token per reset request.
How it was found
- Create an account on the site.
- Request a password reset for your own email and note the hash in the link.
- Request another reset and observe the hash is identical.
- Request a reset for a different account and see the same hash again.
- Change the email parameter in the reset link to the admin's address while keeping the same hash.
- Set a new password and log in as the admin.
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 forget your password, a site emails you a special link with a secret code (a hash) that proves it's you. Here, that code was the same for everyone and never expired, so anyone who got one reset link could change anyone else's password, even the admin's.
What is IDOR?
One user can read or change another user's data, usually by changing an identifier the server trusts without checking who is asking. One of the most paid bug classes on web programs.