IDOR leads to Data leakage and Profile Update
The user update endpoint accepted any user ID without checking ownership, so an authenticated attacker could change another user's first and last name and read their email, company details, referral code and subscription plan. The endpoint also lacked brute-force protection, so an attacker could enumerate user IDs to target many accounts.
In another bug bounty session of mine, I came across a bounty program of a “Contract Review” company.
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 API trusted the user ID in the URL and did not verify that it belonged to the authenticated user.
Impact
An authenticated attacker could modify other users' names and read their email, company details, referral code and subscription plan; the endpoint also lacked brute-force protection, so user IDs could be enumerated to target many accounts.
What the attacker needed
A free account; knowledge of another user's ID
How it was found
- Create two accounts and capture the profile update request for account A.
- Note the user ID of account B.
- Send the same update request but replace the user ID with account B's ID.
- Observe that the response returns account B's data and the update succeeds.
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 log in, the app gives you a token that proves who you are. The app should also check that you are allowed to change only your own profile. Here it did not, so anyone with a valid account could edit other people's profiles and see their private details by swapping the user ID in the request.
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.