IDOR Leads to MASS Account Takeover
The email-change endpoint trusted a user_id cookie for authorisation, so changing that cookie to another user's value let the attacker change that user's email address. The attacker could then trigger a password reset to the new address and take over the account.
Published on yaseenzubair.medium.com
In most web applications, there is a high prevalence of misconfiguration problems, particularly with regard to authorization. While testing a private program, I noticed the userid cookie and thought to experiment by altering its value using both Burp Suite and the Chrome extension, EditThisCookie as it was a 6-digit…
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
Impact
An attacker could take over accounts by changing their email and resetting the password, and could also cause mass account lock-outs by brute-forcing the cookie value, though the attacker cannot choose a specific victim.
What the attacker needed
A free account; ability to intercept requests; a new email address
How it was found
- Create two test accounts.
- Start an email-change request and intercept it.
- Change the user_id cookie to the second account's value.
- Use a new, non-existent email address for the change.
- Send the request; it succeeds.
- Request a password reset to the new email and use the link to set a new password.
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.
A cookie is a small piece of data your browser sends to a website to identify you. Here the site used a cookie called user_id to decide whose account was being changed, instead of checking that the logged-in user owned that account. By editing the cookie, an attacker could change someone else's email and then reset their password.
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.