Critical IDOR Chain — Edit Any User’s Role, Activate/Deac
An API endpoint for updating user roles and status accepted any user ID without checking ownership, and a related endpoint exposed user details by ID. An attacker could change any user's roles, including granting themselves admin, and activate or deactivate any account.
During a security assessment of Target.com, I discovered a critical Insecure Direct Object Reference (IDOR) vulnerability affecting user account management. By manipulating user IDs in privileged API requests, I was able toedit the roles, capabilities, and activation status of any user, including admin accounts.
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 update-user endpoint trusted the user_id supplied in the request body without verifying that the caller was authorised to modify that user, and the user-details endpoint similarly lacked an ownership check.
Impact
An attacker could escalate their own privileges to admin and activate or deactivate any user account, including admin accounts, causing account disruption.
What the attacker needed
A valid user account; knowledge of target user IDs
How it was found
- Analyse JavaScript files to find API endpoints and parameters.
- Identify the user-details endpoint that returns roles based on a user ID.
- Fuzz user IDs to enumerate users and find the admin role ID.
- Send a POST request to the update-user endpoint with your own user ID and the admin role ID.
- Log out and log back in to see admin dashboard access.
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 number, to decide which record to show or change, but forgets to check that the person making the request is allowed to touch that record. Here, the site let anyone send a request with someone else's user number and change their permissions or account status. The attacker just had to guess or enumerate those numbers.
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.