Blog · November 17, 2026
Your Supabase view can leak a table that has RLS on
Turning on Row Level Security for a table doesn't protect every way of reading it. Postgres views default to SECURITY DEFINER behavior: they run with the permissions of whoever created the view, not the person querying it.
Supabase's Security Advisor flags this as an ERROR (lint 0010). A view in the public schema is reachable through your project's API, and a view created in Studio or with the CLI in this mode bypasses RLS. If your AI assistant wrote a handy "user_stats" view over a protected table, anyone holding your publishable key may be able to read all of it.
Fix: recreate the view with (security_invoker = on), then run the Security Advisor again.
Source: https://supabase.com/docs/guides/database/database-linter?lint=0010_security_definer_view
Check your live app for readable Supabase tables with a free, read-only scan at https://leaklatch.vercel.app