critical · M3 · MASVS-AUTH-2 · PTKD-LIVE-SUPABASE-TABLE-READABLE
Supabase table readable with the app's public key
Using only the anon key shipped inside the app, PTKD read a row from this table over Supabase's REST API. Anyone who downloads the app can do the same for every row.
How it is exploited
The attacker unzips the app, copies the project URL and anon key, and runs `curl 'https://<ref>.supabase.co/rest/v1/profiles?select=*' -H 'apikey: <anon>'`. Every profile comes back. PTKD proved this by reading one row and keeping only the column names.
Why it matters
A live, confirmed data leak: this is not a theoretical finding.
How to fix it
- Enable RLS on the table now.
- Add select/insert/update/delete policies on auth.uid().
- Check access logs (Dashboard → Logs → API) for bulk reads.
- If personal data was exposed, follow your breach-notification duties.
Does your app have this?
PTKD checks your build or your source project for PTKD-LIVE-SUPABASE-TABLE-READABLE and every other check in this knowledge base.
Scan your appReferences
Related checks (M3)
- Permissive CORS with credentials
- State-changing request succeeded without authentication
- Weak JWT observed on the wire
- Biometric authentication not bound to a cryptographic key
- Premium access is stored on the phone and trusted (heuristic)
- Firebase rules trust an email address nobody verified
- Firebase security rules open to everyone
- Users can make themselves admin or premium in Firestore