Back to Basics: How I took over an account with a simple ID chang
The account settings page used a sequential numeric identifier in the URL to select which account to display and edit, without checking that the logged-in user owned that account. An attacker could change the identifier to another user's value, view their profile and set a new password, taking over the account.
As bug hunters, we often dive deep into complex vulnerabilities like RCE, SSRF, or Deserialization, sometimes forgetting that the low-hanging fruits are still out there. Recently, I was auditing a private program (let’s call it redacted.com).
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 used the client-supplied account identifier to look up and update the account without verifying that the authenticated user owned that identifier.
Impact
An attacker with any account could view another user's profile and change their password, resulting in full account takeover.
What the attacker needed
A free account on the site; knowledge of another user's identifier
How it was found
- Create an attacker account and open the profile settings page, noting the account identifier in the URL.
- Create a second victim account and note its identifier.
- While logged in as the attacker, change the identifier in the URL to the victim's value.
- Observe the victim's full profile details being displayed.
- Use the edit password field to set a new password for the victim account.
- Log in as the victim with the new password in a private window.
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.
Many websites put an identifier in the address bar to say which record to show, such as your own account page. If the server trusts that number without checking that the record belongs to you, anyone can swap in someone else's number and see or change their data. Here the attacker changed the number to a second account they had created, saw its details, and then set a new password for it.
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.