Skip to content
IDOR Write-up Beginner

How i earned easy$$$ by deleting user comments on any post

The post-details endpoint allowed any user to read a post by swapping the post ID in a GET request, and the comment and like deletion endpoints accepted a swapped comment ID and post ID without checking that the requester owned the post. An attacker could therefore delete other users' comments and likes on any post.

medium.com

Published on medium.com

Hello everyone , i wanted to share with you one of my easiest findings that can make you $$ easily . So lets talk briefly about the program that i was hunting on to give you the big picture .

Le_Merdien, on medium.com

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 user-supplied post and comment identifiers to perform actions without verifying that the requester was the post owner or comment author.

Impact

An attacker could delete comments and likes on any post without being the post owner; deleting the post itself returned 403 forbidden.

What the attacker needed

A free account; victim has a post with comments or likes

How it was found

  1. Create a post from the attacker account by sharing an item with anyone.
  2. Change the request method from POST to GET, remove the body parameters, and swap the post ID in the URL to the victim's post ID to read the post details.
  3. Post a comment on the attacker's own post and delete it to capture the deletion request.
  4. Swap the comment ID to the victim's comment ID and the post ID to the victim's post ID, then send the request to delete the victim's comment.
  5. Repeat the same ID swap to delete likes on the victim's post.

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.

A post is a shared item that has an owner, comments and likes. The site trusted the numbers in the request (post ID and comment ID) to decide what to act on, but never checked that the person sending the request was the post owner. So by changing those numbers, anyone could remove other people's comments and likes.

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.

Similar reports

View all

Same bug class and techniques, clearest first.

Insecure direct object reference (IDOR)

The lesson behind this report.

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.