IDOR : Deleting Comments Like a Boss!
The delete-comment requests on two websites accepted a user-supplied comment identifier without checking that the requester owned that comment. An attacker could delete other users' comments by swapping in their identifiers.
Hello everyone, it’s been a while since I last posted some blogs. In this post, I’m going to share how I found IDOR (Insecure Direct Object Reference) vulnerabilities on two websites.
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 authorised the delete action only by the supplied comment identifier and did not verify that the comment belonged to the requesting user.
Impact
An attacker could delete other users' comments, and on the first site also other users' posts.
What the attacker needed
A user account on the site; ability to post a comment; victim has a comment to delete
How it was found
- Like the victim's comment and intercept the request
- Copy the reply id and drop the request
- Post any comment on the website
- Delete the comment and intercept the request
- Change the reply id to the victim's reply id and forward the request
- Victim's comment 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 your own comment, the website sends a request that names which comment to remove. If the site trusts that name without checking that the comment belongs to you, anyone can put in someone else's comment name and delete it. This is called an insecure direct object reference, or IDOR.
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.