Bestiefy
The quiz API lacked authentication and authorization, allowing anyone to read all answers, add arbitrary leaderboard entries, delete any quiz, and replace a quiz's contents. An attacker could exploit these flaws to manipulate quizzes and leaderboards without being the creator.
medium.com
Published on medium.com
Bestiefy is a web app where users create short 10 question quizzes with questions about themselves, these can be shared easily with a short url like this https://bestiefy.com/q?=abc12. Results to a quiz are stored in a leaderboard that anyone can view, but only the quiz creator can see the exact answers provided by…
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 endpoints lacked proper authentication and authorization checks, allowing unauthenticated access to sensitive operations.
Impact
An attacker could read all quiz answers, manipulate leaderboards, delete any quiz, and replace quiz contents, undermining the integrity of the application.
What the attacker needed
None
The fix
The developers added an Authorization header with a bearer token, but the token can still be generated client-side using an exposed API key, so the fix is incomplete.
How it was found
- Observe that quiz answers are stored in the browser and identify the /api/quizzes endpoint.
- Send a GET request to /api/quizzes/{quiz_id} to retrieve all questions and answers.
- Send a PATCH request to /api/quizzes/{quiz_id} with arbitrary answerers data to add custom leaderboard entries.
- Send a DELETE request to /api/quizzes/{quiz_id} to delete any quiz.
- Send a POST request to /api/quizzes with a specified qid to create a quiz with that ID, effectively replacing a deleted quiz.
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.
The website's quiz system didn't check who was making requests, so anyone could read, change, or delete quizzes. This is like leaving a diary unlocked and anyone can read or write in it.
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.