Horizontal Privilege Escalation via Profile Update Manipulation
The profile update endpoint trusted a user-supplied userID instead of deriving identity from the session, so an authenticated attacker could change another user's profile details. An internal endpoint that returned user identifiers by email made finding a target's ID easier.
medium.com
Published on medium.com
The application provides a profile update feature that allows authenticated users to modify their personal account details.
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
The update endpoint used the client-supplied userID as the object identity instead of checking it against the authenticated session, a missing object-level authorization check.
Impact
An authenticated attacker could modify the profile details of any other user without authorization.
What the attacker needed
A valid account; an intercepting proxy; target's email address
The fix
The update endpoint should derive the user identity from the session or token and reject requests where the supplied userID does not match it.
How it was found
- Log in with valid credentials and open Profile then Update.
- Capture the profile update request with an intercepting proxy.
- Query the internal getByEmail endpoint with the target's email to obtain their userID.
- Replace the userID and email in the update request with the target's values and resend it.
- Observe that the target's profile details were changed.
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 server should know who you are from your session or token. Here the update request also carried a user ID chosen by the client, and the server believed it. That let any logged-in user edit someone else's profile by swapping that ID.
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.