How I Found an IDOR Vulnerability in a Local News App and What You Can Learn From It
The application used user-supplied identifiers in API requests without checking whether the requester was authorised to access or modify that user's data. An attacker could view other users' profile details and change their name, email and phone number.
Published on medium.com
Hey folks! It’s been a while since I last wrote a blog, but I’ve got something interesting to share this time.
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 trusted the user ID supplied by the client instead of deriving the authenticated user's identity from the session.
Impact
An attacker could view other users' personal information and modify their profile data, potentially leading to account takeovers.
What the attacker needed
A user account; ability to intercept HTTP requests
The fix
The application should enforce server-side authorisation and use the session or token to determine the authenticated user's ID instead of client-supplied data.
How it was found
- Configure Burp Suite as a proxy to intercept traffic.
- Open a user profile and observe the request containing the user ID.
- Change the user ID in the request and forward it to view another user's profile.
- Intercept a profile update request and change the user ID to another user's ID.
- Forward the modified update request and reload the victim's profile to confirm the change.
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 lets you ask for a record by its ID, like a user number, and does not check that the record belongs to you. Here, changing the number in the request returned someone else's profile, and a similar change let the author edit another person's 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.