I Breached a Hacker’s Platform by Reading Their Source Code
Two Supabase-backed sites lacked proper access control: on the first, anyone could register an account and reach the admin panel; on the second, a JWT token exposed in client-side code allowed reading the full user table, including plain-text passwords and payment records.
medium.com
Published on medium.com
While scrolling through Facebook, a CTF (Capture The Flag) event post by a university cybersec club caught my eye. What really pulled me in?
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 server-side role checks on Supabase tables and an exposed service token in client-side code.
Impact
An attacker could view, approve or reject all CTF form submissions and read full user data on the first site, and could read the full user table including plain-text passwords and payment records on the second.
What the attacker needed
Internet access; a free account on the target; victim interaction not required
The fix
The text does not say the issues were fixed; it recommends using environment variables, role-based access control, password hashing and security audits.
How it was found
- Submit a dummy form and intercept the request to spot the Supabase endpoint.
- Probe common admin paths and find the /admin login panel.
- Use the Supabase API documentation to create a new user account.
- Log in with the new account and reach the admin panel.
- Register on the second service and inspect the Next.js front-end code.
- Use the exposed JWT token to query the users endpoint and retrieve the user table.
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.
A backend service called Supabase was used to store form submissions and user accounts. On the first site, the admin panel did not check who was logging in, so creating a normal account gave admin powers. On the second site, a login token was left in the code that browsers download, and that token could read the whole user database.
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.