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

    1. Enable RLS on the table now.
    2. Add select/insert/update/delete policies on auth.uid().
    3. Check access logs (Dashboard → Logs → API) for bulk reads.
    4. 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 app

    References

    Related checks (M3)