IDOR, YOU-DOR, WE ALL DOR for BugForge
The application exposed user-specific statistics through an API endpoint that accepted a user ID, allowing an attacker to change the ID and view another user's stats, which contained the flag. The attacker enumerated IDs and found the flag in user 1's stats.
medium.com
Published on medium.com
It it time to once again put my mind to paper and walk through some Insecure Direct Object Reference (IDOR) hunting in the Jan 13, 2025 daily challenge from BugForge.io. This lab took place in the Tanuki web application, which is a flash card study type application.
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 API endpoint for user statistics did not verify that the requested user ID belonged to the authenticated user.
Impact
An attacker could view other users' statistics, which in this case contained the flag; the text does not indicate any further impact.
What the attacker needed
A free account
How it was found
- Register a test account and note the assigned user ID from the registration response.
- Log in and navigate to the Stats page.
- Observe the API request to /api/stats/4 in the proxy history.
- Send the request to Repeater and change the ID to 1.
- Observe the response containing the flag.
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 number, to refer to your data and doesn't check if you're allowed to see it. Here, the stats page fetched data from an address ending in your user number, and changing that number showed someone else's statistics. This is like changing the page number in a book and getting someone else's chapter.
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.