Skip to content
IDOR Write-up Beginner

IDOR: How I Could Delete Any Product Image on an E-Commerce Platform

The image deletion endpoint accepted an image identifier from the client and deleted the matching image without checking that it belonged to the logged-in user. An attacker could change the identifier to delete other sellers' product images, potentially in bulk.

infosecwriteups.com

Published on infosecwriteups.com

I’m Mahmoud El Manzalawy, a penetration tester and bug bounty hunterwho enjoys discovering vulnerabilities in my free time. In this write-up, I’ll walk you through How I found Insecure Direct Object Reference (IDOR) in Image Deletion Endpoint .

Mahmoud El Manzalawy, on infosecwriteups.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 handler looked up the image purely by the client-supplied identifier and never compared the image's owner with the authenticated session.

Impact

An attacker could delete other sellers' product images and potentially carry out mass deletion, disrupting business operations and harming user trust.

What the attacker needed

A free account; an uploaded product image; predictable image identifiers

How it was found

  1. Craft a request using an arbitrary image identifier.
  2. Send it straight to the deletion endpoint with that identifier.
  3. Open the crafted URL and observe that the image was 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 picture on a website, your browser sends the site an identifier for that picture. Here the site trusted whatever identifier arrived and never checked that the picture was yours. So anyone could swap in someone else's identifier and wipe out their pictures.

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.