I Modified Collections I Did Not Own: IDOR
The collection reordering API endpoint did not verify that the authenticated user owned the collection being modified. An attacker could change the position of any other user's collection, including private ones, by swapping the collection ID in the request.
medium.com
Published on medium.com
Hey Hackers, I am Parth Narula. A penetration tester, bug hunter, red teamer and overall a security researcher.
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 API endpoint authenticated the user but failed to check if the user owned the collection being modified.
Impact
An attacker could reorder any other user's collections, including private ones, without owning them.
What the attacker needed
A free account; victim has a collection
How it was found
- Create two accounts: one victim with a collection, one attacker.
- Intercept the request to reorder a collection owned by the attacker.
- Change the collection ID in the request to the victim's collection ID.
- Send the request and observe a 200 OK response with 'owned: false'.
- Refresh the victim's collections page to see the changed position.
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.
This is an IDOR (Insecure Direct Object Reference) bug. The server checked who you were but not whether you were allowed to change a specific item. By changing a number in the request, the attacker could reorder someone else's collections.
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.