RLS or auth present, but no ownership check (IDOR)
Last updated November 15, 2026
Steps
- Create two test accounts (User A and User B) in your own app.
- As User A, note a record id that belongs only to you (an order, note or profile row).
- Sign in as User B and request User A's id through your API or client (for example GET /api/.../{id}).
- If User B can read or change User A's data, ownership is missing — fix RLS policies and server routes so every query filters on auth.uid() (or your user id) matching the row owner.
- Retest with both users after the fix.
Why it matters
Supabase documents that the publishable (anon) key is safe in the browser only when RLS policies correctly restrict rows: https://supabase.com/docs/guides/database/secure-data and https://supabase.com/docs/guides/database/postgres/row-level-security
Launch checklists for vibe-coded apps call out ownership checks on API routes alongside RLS: https://rivetzco.com/checklist
Self-check your own app only. Never probe apps you don't own.
Related patterns
- Row Level Security disabled on Supabase tables
- API routes with no auth check
- Mass assignment: users can set fields like role or is_admin
- Auth checked only in Next.js middleware (proxy)
- Supabase SECURITY DEFINER functions any visitor can call
- API responses that return whole database records (excessive data exposure)
- AI document search that shows one customer’s files to another (RAG and vector store leaks)
Found a problem you'd rather not fix yourself?
Tell us what's wrong. A StorenTech engineer reviews your app and replies with a fixed quote, so you know the cost before any work starts.
Get it fixed by StorenTechVibe Security Weekly
One email a week with new failure patterns and how to fix them.
By joining you agree we may email you this newsletter. See our privacy policy. Free. Unsubscribe anytime. We'll never sell your email.