Insecure Direct Object Reference (IDOR) in a Government Portal
An API endpoint returned user profile data for any user_id without checking whether the requester was allowed to see it. An attacker could enumerate other users' profiles, including administrative or staff details.
medium.com
Published on medium.com
While exploring a government web application, I stumbled upon a critical vulnerability—an IDOR (Insecure Direct Object Reference) that allowed access to sensitive user information just by modifying a parameter in an API request.
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 endpoint did not verify that the authenticated user was authorised to access the requested user_id.
Impact
An attacker could enumerate any user's profile without authorisation, and some responses revealed administrative or staff-level details.
What the attacker needed
A test account; ability to intercept HTTP requests
The fix
The endpoint should enforce server-side access control so a user can only retrieve their own profile or profiles they are authorised to view.
How it was found
- Log in to the platform with a test account.
- Use Burp Suite to capture requests.
- Capture the profile request containing a user_id parameter.
- Change the user_id to another value, such as an admin or other user.
- Observe the response containing other users' data.
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 happens when a website uses a number or name in a request to pick which record to show, but forgets to check that the person asking is allowed to see that record. Here, changing the user_id in a request returned someone else's profile. This is like changing a ticket number and being handed a stranger's file.
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.