Finding an IDOR in User Profile API: A $15,000 Journey to Critic
The user profile API endpoints lacked server-side authorization checks, so any authenticated user could view, modify, or delete any other user's private profile data by changing the user ID in the request. This allowed access to sensitive information such as email addresses, phone numbers, billing addresses, and API keys, as well as account deletion.
Published on infosecwriteups.com
The program I was hunting on had a solid scope that included their main web application and all associated API endpoints. They specifically called out “.targetapp.com” and “.targetapp.io” as in-scope, along with their mobile API which was accessible via “api.targetapp.io”.
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 API endpoints did not verify that the authenticated user was authorised to access the requested user ID, relying only on the presence of a valid token.
Impact
An attacker could access, modify, or delete any user's private profile data, including sensitive information and API keys, potentially leading to account takeover and data breaches.
What the attacker needed
A free account; knowledge of another user's ID
The fix
The API was fixed by adding server-side authorization checks to ensure the authenticated user matches the requested user ID or has admin privileges.
How it was found
- Create two test accounts (User A and User B) and note their user IDs.
- While logged in as User A, send a GET request to the profile endpoint with User B's ID.
- Observe that User B's private profile data is returned without an authorization error.
- Send a PUT request to the same endpoint with User B's ID to modify their profile.
- Send a DELETE request to the same endpoint with User B's ID to delete their account.
- Use an automated tool to enumerate sequential user IDs and extract multiple profiles.
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.
An IDOR (Insecure Direct Object Reference) happens when a website uses a simple identifier, like a user ID number, to decide what data to show, but forgets to check if the person asking is allowed to see it. Here, any logged-in user could change the number in the request to see or change someone else's profile. This is like a hotel giving you a room key that opens every door just because you asked for a different room number.
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.