How I Found an IDOR Vulnerability in public bug bounty program of
A normal user in one organisation could delete a user belonging to another organisation by changing the organisation ID and user ID in a delete request. The attacker could remove a victim from an organisation where they had no admin rights.
Published on infosecwriteups.com
Assalam o alaikum for muslim brothers and hello for non muslims, i hope all of you are doing well and learning new things day by day.
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 delete endpoint trusted the organisation and user IDs supplied by the client and did not verify that the caller had permission over that organisation or user.
Impact
A normal user could delete another user from an organisation where they had no admin rights, causing unauthorised data loss.
What the attacker needed
A normal user account in organisation A; admin rights in organisation B; victim belongs to both organisations
The fix
The delete endpoint should verify that the caller has permission over the target organisation and user before acting.
How it was found
- Log in as a normal user in organisation B.
- Invite the victim to organisation B and capture the response, which discloses the victim's user ID.
- Intercept a delete request for a user in organisation B.
- Change the organisation ID from B to A and the user ID to the victim's.
- Send the request; the victim is deleted from organisation A.
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 lets you reach someone else's data just by changing an identifier in a request, without checking that the data belongs to you. Here, a delete request contained an organisation ID and a user ID; swapping them let a low-privileged user delete a person from a different organisation.
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.