AppInspected

Fix guides

Supabase stopped exposing new tables automatically on October 30. What to check, and how not to undo it.

Last reviewed October 30, 2026 against the providers' current documentation.

The short version

Since October 30, 2026, Supabase no longer gives its API roles access to new tables in the public schema on existing projects. Tables you already have keep their grants, so a table that was open before stays open: check them with the Security Advisor now. When a new table fails with error 42501, grant only what the app needs, turn RLS on and add policies. Don't fix it by granting everything to anon.

Why it matters

Until now, every new table in public got select, insert, update and delete granted to the anon, authenticated and service_role roles automatically. With Row Level Security off, that meant anyone holding the publishable or anon key from your app's JavaScript could read and change the table. Supabase's change closes new tables by default, which is a real improvement. But it does nothing for the tables you already have, and the errors it causes on new tables invite a quick fix that opens everything again, especially when an AI tool writes the fix for you.

Fix it, in this order

  1. Check the tables you already have

    Existing tables kept their grants on October 30, so the change doesn't protect them. In the Supabase dashboard, open Advisors → Security Advisor and look for RLS disabled in public, or run this in the SQL editor:
    select tablename, rowsecurity
    from pg_tables
    where schemaname = 'public'
    order by rowsecurity, tablename;
    Fix every row with rowsecurity = false first. Our RLS guide has the SQL.
  2. Know what the change looks like

    Since October 30, a new table in public, whether you, a migration or your AI builder created it, can't be reached through the Data API until you grant access. That covers supabase-js and other client libraries, /rest/v1/ and /graphql/v1. Requests fail with error 42501, permission denied for table your_table, and a hint showing the grant you'd need. Direct Postgres connections aren't affected, and neither are the storage, auth, realtime or your own custom schemas. The Table Editor shows a Data API exposure badge on each table.
  3. Open a new table the safe way

    Grant only the operations the app performs, only to the roles that need them, and turn on RLS with policies in the same migration:
    -- signed-in users manage their own rows
    grant select, insert, update, delete on public.your_table to authenticated;
    -- only if signed-out visitors really need to read it:
    -- grant select on public.your_table to anon;
    
    alter table public.your_table enable row level security;
    
    create policy "Owners read" on public.your_table
      for select to authenticated
      using ( (select auth.uid()) = user_id );
    Add a policy for each other operation you granted, or let our 42501 guide's SQL generator write them for your table. Grants decide whether a role can touch the table at all; policies decide which rows it sees.
  4. Don't undo the change to make errors go away

    Supabase documents how to roll back: restore the old default privileges and grant everything on all tables in public to anon, authenticated and service_role. That reopens every table, including any with RLS off. Only consider it if every table already has RLS and policies, and prefer granting table by table.
  5. Not switched yet? Do it yourself

    Supabase applies the change to existing projects on October 30. If a table you create still gets anon grants automatically, your project hasn't switched yet, and Supabase's changelog gives the SQL to stop granting default privileges on future tables and sequences in public:
    alter default privileges for role postgres in schema public
      revoke select, insert, update, delete on tables from anon, authenticated, service_role;
    
    alter default privileges for role postgres in schema public
      revoke usage, select on sequences from anon, authenticated, service_role;
    It only affects objects created afterwards. To restrict a table that already exists, revoke its privileges on that table.
  6. Test as a stranger and as another user

    After each change, open the app in a private window without logging in, then as a second test user, and confirm neither can see or change the first user's rows.

Or ask your AI tool to do it

Paste this into Lovable, Bolt, Cursor, Claude Code or whichever tool built your app. Review what it changes before you deploy.

Supabase no longer exposes new tables in the public schema to the Data API automatically (from October 30, 2026 on existing projects). Before changing anything, list every table in the public schema with its Row Level Security status, its grants for anon, authenticated and service_role, and its policies. For each table the app needs that is missing grants (error 42501, permission denied for table), write a migration that grants only the operations the app performs, only to the roles that need them (anon only for data meant for signed-out visitors, and then only select), enables row level security and adds one policy per operation limited to the row's owner with (select auth.uid()). Never fix a 42501 error by granting all privileges to anon, by restoring the old default privileges or by turning RLS off. Also flag every existing table that has RLS off.

How this happens

Supabase announced the change in its changelog on April 28, 2026. It became the default for new projects from May 30, 2026, rolled out over a few weeks, and was applied to all existing projects on October 30, 2026. Supabase emailed project owners about it on September 23 and October 23. It only changes which privileges new tables get by default; Row Level Security works exactly as before.

Check what your app exposes

The free check reads your live site the way an attacker would: it finds which Supabase project your app talks to and flags any secret key in your JavaScript. To test the tables themselves, add the database tests to the website security report.

Topic check: Supabase security check

Test your database, not just your code

The free check can only see your code. The website security report can add database tests: with test accounts you create, it checks whether a stranger or another signed-in user can read data they shouldn't. It also covers up to 30 pages and 40 JavaScript files, exposed files, headers and libraries, with the fix for each finding.

$19 once, including 20 runs over 30 days so you can fix things and check again.

Get the report, $19 See an example report

Example report header: a score out of 100, findings by severity, Download PDF and Email me this report.

Questions

Does this make my existing tables safe?

No. Tables that exist before the change keep their current grants and stay reachable through the Data API. If one had RLS off before, it's still open after October 30.

Did October 30 break my app?

Not the tables you already had. What breaks is a table created since then, for example when you ask your AI tool to add a feature: requests to it fail with error 42501 until you grant access.

Is Row Level Security changing?

No. Grants decide whether a role can use a table at all, and RLS decides which rows it sees. You still need both.

Does it affect storage, auth or my server code?

Only the public schema changes. storage, auth, realtime and custom schemas keep their current grants and defaults, and direct Postgres connections aren't affected.

Can AppInspected check this?

The free check finds which Supabase project your app talks to and flags any secret key in your JavaScript. It can't see grants or policies. The website security report can add database tests that use your own test accounts to check whether a stranger or another user can read data they shouldn't.

Sources

Related guides