Skip to content
Access control Write-up Intermediate

From N/A to $$$: A Simple Python Script Led to Application-Level

A comment deletion endpoint did not verify that the comment belonged to the requester, so replaying the same delete request removed other users' comments. An attacker could repeatedly delete all comments on a photo, denying users the comment function.

Hashim Amin Follow

Published on hashimamin.medium.com

Hello, friend! This is mrhashimamin.

Hashim Amin, on hashimamin.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 delete endpoint identified the comment only by an identifier in the request and did not check that the comment belonged to the authenticated user.

Impact

An attacker could delete all comments on a photo and keep deleting new ones, denying users the comment function; the triager initially could not reproduce it because comments reappeared once another user added a new comment.

What the attacker needed

A free account; ability to post a comment; capture and replay the delete request

How it was found

  1. Post a comment on any image.
  2. Capture the request that deletes your own comment and save it.
  3. Use a script to resend that request repeatedly.
  4. New comments added by other users are deleted along with existing ones.

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 app sends a request to the server. The server should check that the comment is yours before deleting it. Here it did not, so sending the same request again and again deleted other people's comments too.

What is Access control?

A user can do something their role should not allow: reach an admin function, act on a feature they have not paid for, or skip a permission check. IDOR is the special case where the object belongs to someone else.

More by Hashim Amin

View all

1 more disclosed report, best first.

Similar reports

View all

Same bug class and techniques, clearest first.

Broken access control

The lesson behind this report.

A user can do something their role should not allow: reach an admin function, act on a feature they have not paid for, or skip a permission check. IDOR is the special case where the object belongs to someone else.