Accidentally making $1000 for finding Security Bugs as a Backend Developer
The backend exposed Supabase tables without row-level security, allowing anyone with the public anon key to read all users, messages and attachments. Separately, API endpoints lacked ownership checks, so a logged-in user could read or edit any other user's data by supplying their identifier.
Published on not-afraid.medium.com
And because Streaming response from an LLM to the frontend is something I have never worked with, I got curious to understand how their Backend works.
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 missing row-level security on Supabase tables plus API endpoints that authorised requests by a valid token but never checked that the token's owner matched the requested record.
Impact
An attacker could read all users, their chat messages and uploaded photos, and with a valid account could read or edit any other user's data; the report does not claim account takeover.
What the attacker needed
Public Supabase key from the site; a free account for the API issues; knowledge of a victim's identifier
The fix
The tables were made private and the API issues were fixed, according to the author.
How it was found
- Open the site's developer tools and note the Supabase endpoint and public key.
- Query the REST endpoint to list the table schema.
- Loop over each table name and request one row to see which tables are readable.
- Use a valid login token against the API to request another user's identifier.
- Obtain other users' identifiers from the public character listings.
- Use those identifiers with the same token to read or edit their data.
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 site stored its data in a hosted database service and left some tables open to anyone who had the public key that ships with the website. That meant a stranger could list every user, chat message and uploaded photo. The site's own API also failed to check that the person asking for a record actually owned it, so any logged-in user could reach other people's data.
What is Access control?
A user can do something their role should not allow: reach an admin function, act on a feature they have not paid for, or skip a permission check. IDOR is the special case where the object belongs to someone else.