Exploiting an IDOR Vulnerability: A Web Pentester’s Perspective
The application exposed user posts through sequential IDs in the URL without checking whether the logged-in user owned the record. An attacker could view and edit other users' posts by changing the ID value.
medium.com
Published on medium.com
The ID parameter appeared to reference a specific database record. My initial concern was whether this ID was adequately protected against tampering.
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 server used the ID from the request to fetch and update the post without verifying that the post belonged to the authenticated user.
Impact
An attacker could view all posts and modify or delete other users' content, which could lead to data breaches and loss of user trust.
What the attacker needed
A standard user account; knowledge of a post ID
The fix
The application should enforce server-side authorization checks on every request and use unguessable identifiers instead of sequential IDs.
How it was found
- Log in with a standard user account and create a new post.
- Note the post ID in the edit URL.
- Change the ID in the URL to a different value.
- Observe that another user's post is shown and can be edited.
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 simple identifier, like a number in the address bar, to pick which record to show, but forgets to check that the person asking is allowed to see it. Here, changing the number let one user open and change another user's post.
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.