Second Strike: Uncovering a GraphQL IDOR That Let Me Delete Anyones Post
The delete-post function did not verify that the post being deleted belonged to the requesting user. An attacker could delete any post on the platform by swapping their own post ID for another user's post ID.
Yap. This time, it was an IDOR (Insecure Direct Object Reference).
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 did not verify that the post ID in the delete request belonged to the authenticated user.
Impact
An attacker could delete any post on the platform, including posts by other users.
What the attacker needed
A free account; ability to intercept HTTP requests
The fix
The team fixed the bug after it was reported.
How it was found
- Create a post on T2 Social and note its ID.
- Intercept the DELETE request sent when deleting your own post.
- Replace your post ID with the ID of a post from another account.
- Send the modified request; the other account's post is deleted.
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.
When you delete a post, the app should check that the post is yours. Here, it only checked that you were logged in, not that you owned the post. So anyone could delete anyone else's post by changing the ID number in the request.
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.