Database and row level security
These guides are about data that the client can reach. On Supabase, tables in the public schema are on the API, and row level security is what decides who can read a row. Firebase rules and storage policies do the same job for Firestore, Storage, and file buckets. Lovable's own Supabase notes call missing policies a common way app data gets exposed, so that guide sits here too.
Grants sit under row level security and decide whether a role reaches a table at all. On existing Supabase projects, the October 30, 2026 change means a new table in the public schema gets no Data API access until a role is granted it. The grant guides here cover the change itself, a read-only check for what each role is missing, and writing grants into your migrations.
Functions and views need their own checks. Any role with EXECUTE on a function in public can call it at /rest/v1/rpc, as Can anyone call your Supabase functions? explains. A view in the default mode reads its tables as its owner, which is why Do Supabase views bypass RLS? sets security_invoker.
These pages are guides to checks and fixes. Dated reports about missing or bypassed row checks are on Row Level Security incidents, including CVE-2025-48757 for Lovable-generated sites, and Supabase fixes lists the guides that include a Supabase section.
Guides
How to check if RLS is enabled on every Supabase table
How to check whether the Supabase anon key can read every row of a public table the Data API exposes when row level security is off.
Supabase's Oct 30 change: new tables aren't exposed automatically
On October 30, 2026, existing Supabase projects stop exposing new public tables to the Data API. A missing GRANT returns error 42501. Copy-paste fix.
Supabase permission denied for table (42501) on a new table: what changed on October 30, 2026?
From October 30, 2026, new public tables in existing Supabase projects need an explicit grant. Read-only queries list what is missing; the fix SQL follows.
Lovable app security: RLS, keys, and auth
Lovable's own Supabase guide says missing row level security policies are the most common way app data gets exposed, and that secret keys must stay out of the client.
Open storage buckets
A public bucket, or a storage policy of allow-all, lets anyone with the URL read files other users uploaded.
Firebase rules left open
Firestore or Storage rules that allow any read and write make the database public. The client SDK will do whatever the rules allow.
Can anyone call your Supabase functions?
Yes. By default even anon can call a function in public at /rest/v1/rpc; postgres-owned security definer ones skip RLS. Revoke EXECUTE from PUBLIC and anon.
Do Supabase views bypass RLS? How to check
Often, yes. By default a view reads its tables with its owner's permissions, so it skips RLS whenever that owner does. Set security_invoker = true.
How do I add Supabase Data API grants to my migrations?
Write each role's grant in the migration that creates the table, next to enable row level security and the policies. Grant anon only for public tables.
Questions
Does turning on row level security without a policy lock the table?
On Supabase, enabling row level security with no policy means the anon and authenticated roles cannot read or write through the API. That is safer than leaving it off, and it will also break the app until you add the policy you actually want. Write the policy, then test it as a second user.
Will a secret key still read every row after I add policies?
Yes. Supabase documents that the secret key bypasses row level security. Policies apply to the publishable key and to signed-in users. Keep the secret key in server code only.
Is a public storage bucket the same bug as a public table?
It is the same kind of mistake. Anyone with the file URL can read the object. User uploads belong in a private bucket, with a policy that checks the owner, and the file should not be served as HTML from your own origin.
Firebase says the client API key is fine to ship. What is the control?
The web config is meant to live in the client. Firestore and Storage rules are the control. Rules that allow any read and write, or that are still in test mode, make the database public to the client SDK.
Recently updated
Guides
Platform fixes
Incidents
- Google's Cloud Run MCP server could send your source code to a storage bucket an attacker set up first
- One compressed request can crash a Node.js app that uses body-parser with default options
- @sentry/nextjs tunnelRoute skipped Next.js middleware for more paths than it forwards to Sentry
- MCP TypeScript SDK servers using experimental tasks let one client read and cancel another client's tasks