How I can discover the winner before the official reveal
The API endpoint for draft winners lacked proper access control, allowing an attacker to change the draft winner ID in the request to access another user's unannounced competition winner. This let the attacker discover the winner before the official reveal.
Published on medium.com
A few months ago, I identified a vulnerability in a self-hosted program that allows an attacker to leak the competition winner’s information before the official announcement. During the process, I came across something quite interesting that I think is worth discussing, so let’s dive right into it.
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 did not verify that the authenticated user owned the draft winner ID being requested, allowing access to any draft winner by ID.
Impact
The attacker can discover the winner of the victim’s competition before the official announcement and can spread this information to other participants.
What the attacker needed
Two accounts (attacker and victim); Both create competitions; Both create draft winners
How it was found
- Prepare two accounts, one attacker and one victim.
- Both create a competition on their accounts.
- Both create draft winners for their competitions.
- Attacker inspects the HTTP request for their draft winner in Burp Suite.
- Attacker modifies the draft winner ID to the victim's draft winner ID.
- Attacker views the victim's draft winner.
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.
This is an example of an insecure direct object reference (IDOR), where a web application uses an identifier (like a number) to access a resource but doesn't check if the user is allowed to access that specific resource. By changing the number in the request, an attacker can view someone else's private data.
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.