Skip to content
IDOR Write-up Beginner

Gone In A Click Idor Vulnerabilities In Image Upload Function

The image upload, preview, and deletion endpoints used sequential user IDs and file names without checking ownership, so an attacker could change another user's profile image or delete it by altering the ID or file name. The author also found a third endpoint where only the file name needed to be replaced to delete any user's image.

rootxy4sh Follow

Published on infosecwriteups.com

Greetings, fellow cybersecurity researchers! I’m Rootxyash, a passionate security researcher and an unwavering part-time bug bounty hunter.

rootxy4sh, 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 server trusted the user-supplied ID or file name in the image endpoints without verifying that the authenticated user owned the referenced image.

Impact

An attacker could view, replace, or delete the profile images of any user on the platform by changing identifiers, and the report says the issues were fixed within a day.

What the attacker needed

A free account; knowledge of victim's user ID or file name

The fix

The developers applied fixes to all three endpoints within a day, though the report does not describe the fix.

How it was found

  1. Create an account and inspect the page's JavaScript files to find image-related endpoints.
  2. Capture the request that previews the current profile image.
  3. Change the user ID in the preview request to another user's ID and observe that the other user's image is returned.
  4. Capture the image upload request and change the user ID to another user's ID to replace their profile image.
  5. Capture the request used when cancelling an upload and replace the file name with another user's image file name to delete that image.

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.

An IDOR (Insecure Direct Object Reference) happens when a website uses a simple identifier, like a user number, to decide what you can see or change, but does not check that the identifier belongs to you. Here, the image endpoints accepted any user's number or file name, so one user could act on another user's images. This is a type of broken access control.

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.

More by rootxy4sh

View all

1 more disclosed report, best first.

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.