Day 19: I edited someone’s profile without their permission!
A profile update request carried a user_id parameter that the server trusted, so changing it from the attacker's own ID to another user's ID let the attacker edit that other user's profile. No ownership or permission check was performed on the supplied identifier.
medium.com
Published on medium.com
Target Application: https://github.com/Yavuzlar/VulnLab/tree/main
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 server took the user identifier from the client request and updated that profile without verifying that the logged-in user owned it.
Impact
An attacker could edit other users' profiles, defacing them, spreading malicious links, impersonating users and manipulating public information.
What the attacker needed
A normal user account; ability to intercept requests
The fix
The server should derive the user identity from the session and validate ownership before modifying any profile data, ignoring client-supplied user IDs.
How it was found
- Log in as a normal user and open the profile edit page.
- Intercept the profile update request before it reaches the server.
- Change the user_id parameter from your own ID to another user's ID.
- Send the modified request and observe that the other user's profile is updated.
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 save your profile, your browser sends a request to the server saying which account to update. Here the server believed whatever account number the request contained, instead of checking that the logged-in person actually owned that account. So by swapping one number, a normal user could change someone else's profile details.
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.