How I Turned a Boring Image Downloader into an IDOR Goldmine
An image download endpoint accepted a filename parameter and returned any stored image without checking ownership, so a user could fetch another user's uploaded image by supplying its filename. Because filenames followed a predictable pattern of a sequential account ID, the user's name and a Unix timestamp, the authors scripted enumeration to guess valid filenames and confirmed access to real users' images.
medium.com
Published on medium.com
Hello, bug hunters and security enthusiasts! I’m excited to share a story from my recent adventure in vulnerability hunting.
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
Impact
An attacker could download other users' uploaded images within the 30-day storage window, but only by guessing the account ID, name and timestamp combination, which the program judged non-trivial and reflected in a lower CVSS score.
What the attacker needed
A free account; knowledge of the target's name; guessable ID and timestamp
How it was found
- Observe the download request made during a normal session and note the filename parameter.
- Create a second account, upload an image, and take its filename.
- Use the second account's filename in the first account's download URL and confirm the image is returned.
- Study the filename pattern: a six-digit sequential account ID, the user's name and a Unix timestamp.
- Script enumeration of IDs in reverse and generate candidate timestamps, then request each candidate filename.
- Filter out not-found and forbidden responses and keep the successful ones as proof of access.
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 download your processed image, the site puts the file's name in the web address. The site never checked that the file belonged to you, so changing the name let you download someone else's picture. The names were guessable because they were built from a simple counter, the person's name and the upload time.
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.