Terms & acceptable use
🔒 Supabase Oct 30 change

Fixed a Supabase permission error? Make sure you didn't open a private table. Paste your live app link. We check for open tables, leaked keys and more. Free.

FreeJust your email to see results10 seconds

The free scan shows your problems. The $9 fix report gives you a copy‑paste fix prompt for each one.

Guide · Supabase · Updated

Supabase "Permission Denied for Table" (42501) After the Oct 30 Change: How to Fix It Safely

On October 30, 2026, Supabase changes how new tables work on every existing project. If your AI builder adds a table after that and your app shows "permission denied for table", this guide explains why, how to fix it the safe way, and how to check that the fix didn't make private data public.

1. The short answer

From October 30, 2026, a new table in your Supabase public schema is locked to your app until you add a GRANT. Tables you already have keep working.

If a new table gives you error 42501 "permission denied for table", don't turn off RLS and don't grant everything. Grant only what each role needs, keep RLS on, and add a policy. Then check your live app from the outside to make sure private tables are still private.

2. What is changing, and when

Until now, Supabase gave every new table in public read, insert, update and delete rights for the anon, authenticated and service_role roles. So every new table was reachable by your app the moment it was made. Supabase says that made it easy to expose a new table before anyone secured it, especially now that AI tools create tables with no human checking.

After the change, a new table exists but your app can't reach it until you say so with a GRANT. Here are the dates Supabase gives:

DateWhat happens
April 28, 2026You can opt in when you create a new project.
May 30, 2026It starts becoming the default for new projects (rolled out over a few weeks).
October 23, 2026Supabase plans a final email notice to project owners and admins.
October 30, 2026It applies to all existing projects.

Row Level Security (RLS) does not change. Grants and RLS are two separate locks. The grant decides if a role can reach the table at all. RLS decides which rows it can see.

Source: Supabase changelog: tables not exposed to Data and GraphQL API automatically

3. Who is affected

Supabase says you need to act if any of these is true:

  • Your app reads or writes public tables through the Data API. That means supabase-js or another Supabase client library, GraphQL, or direct calls to /rest/v1/ or /graphql/v1.
  • Your migrations create tables in public without GRANT statements.
  • Your AI coding tool, a script or the Management API creates tables and expects them to work right away.

Apps built with Lovable, Bolt, v0 or Cursor that talk to Supabase from the browser usually do it with supabase-js, so check yours.

Not affected: tables you already have, apps that only use a direct Postgres connection (psql, an ORM or a server with a connection string), and tables in storage, auth, realtime or custom schemas.

Supabase also says its Security Advisor flags affected tables and shows the SQL to fix them, and the Table Editor shows a Data API exposure badge.

Source: Supabase changelog

4. What the 42501 error looks like

When a grant is missing, the API sends back an error like this. The hint names the role and the exact GRANT it is missing:

{
  "code": "42501",
  "message": "permission denied for table your_table",
  "hint": "Grant the required privileges to the current role with: GRANT SELECT ON public.your_table TO anon;"
}

Your app may show it as a 401 or 403 error, or the page may just come up empty. Supabase lists other causes of 42501 too:

  • An RLS policy blocks an insert or update.
  • Column-level limits block a column (even select * fails if it includes a blocked column).
  • The request asks for a schema the API can't reach, like auth or vault.

Read the hint before you copy it. If it says TO anon, that means "let logged-out visitors in". That is only right for tables that are meant to be public.

Sources: Supabase docs: Database API 42501 errors · Supabase docs: Securing your API

5. The safe fix: grant, RLS, policy

Supabase says to treat these three steps as one unit, in the same migration. Here is a private table where each user only sees their own rows:

-- 1. Grant only what each role needs (no anon for private data)
grant select, insert, update, delete on public.your_table to authenticated;
grant select, insert, update, delete on public.your_table to service_role;

-- 2. Keep RLS on
alter table public.your_table enable row level security;

-- 3. Add a policy
create policy "users can read their own rows"
  on public.your_table for select to authenticated
  using (auth.uid() = user_id);

Add a policy for insert, update and delete too, if your app does those. For a table that logged-out visitors should read, like published posts, add grant select on public.your_table to anon; and a select policy for anon. Don't give anon insert, update or delete unless you really mean it.

If your AI builder makes your tables, tell it to always add grants with RLS and policies. Supabase also offers an agent skill for AI coding tools that includes the grants step. The second prompt below sets this up as a rule.

Sources: Supabase changelog · Supabase docs: Securing your API

6. Fixes that make things worse

When an app breaks, it's tempting to take the fastest fix your AI suggests. Watch out for these:

  • Turning off RLS. It does not add the missing grant, so it won't fix a missing-grant error. Once the table has a grant, RLS off means anyone with your public key can read and change every row.
  • Granting every table at once. grant ... on all tables in schema public to anon, authenticated, service_role opens every table to every role, including private ones. Supabase lists it as a way to roll back to the old behavior, and says to revoke private tables one by one afterward.
  • Copying the hint's TO anon for a private table. That lets logged-out visitors reach it. Use authenticated instead, with a policy.
  • Using the secret key in the browser to "get around" it. The secret key and the older service_role key skip RLS completely. They must never be in frontend code.

7. See what each table is granted

Open the SQL Editor in your Supabase dashboard and run this for a table. It only reads, so it's safe:

select grantee, privilege_type
from information_schema.role_table_grants
where table_name = 'your_table';

If anon shows up on a private table, that's a problem. You can take it away with:

revoke all on table public.your_table from anon;

You can also open Advisors → Security Advisor. It is free and flags tables to review.

Sources: Supabase docs: Database API 42501 errors · Supabase changelog

8. Check your live app after the fix

The real test is what a stranger can see. After you add grants, try to read each table while logged out, using the public key your live app already ships:

curl "https://YOUR-PROJECT.supabase.co/rest/v1/TABLE_NAME?select=*&limit=1" \
  -H "apikey: YOUR_PUBLIC_KEY"
  • Real rows from a private table: it's open to everyone. Fix it first.
  • Error 42501: logged-out visitors can't reach it. Good for a private table.
  • [] (empty list): not proof either way. The table may be empty, or RLS hid every row.

Then sign in as two different users and make sure user B can't see user A's rows. Our Supabase RLS check guide walks through both tests step by step.

Only check apps you own or have permission to test.

Or let VibeCheck check it

VibeCheck checks your live app from the outside, the way a stranger would. If your app talks to Supabase from the browser, it uses the public key your app already ships and asks for one row from common table names to see if they are open. It reports table names only and never stores or shows the rows. It also looks for secret keys in your public JavaScript, plus security headers, Google basics and broken links.

It only looks. It never logs in or changes anything, and it can't see your grants or policies. So still run the Security Advisor and the two-account test.

Pricing: the problems list is free (just add your email). A fix report with a copy-paste prompt for every problem is $9. Or get 10 fix reports for $29. No subscription.

9. Copy-paste fix prompts

Paste one into Lovable, Bolt, v0, Cursor or your AI builder. After each fix, run the checks above again.

Fix a 42501 error on a new table
My Supabase app shows error 42501 "permission denied for table TABLE_NAME". Supabase no longer grants new tables in the public schema to the API roles by default. Do not turn off Row Level Security and do not grant all tables at once. For this one table: 1) add only the GRANT statements each role needs (authenticated and service_role for private data; anon only if logged-out visitors truly need it), 2) make sure RLS is enabled, 3) add a separate policy for select, insert, update and delete that matches rows to auth.uid(). Put all of it in one migration and show me the SQL.
Make your AI builder add grants every time
From now on, every time you create a new table in my Supabase public schema, put these in the same migration: the GRANT statements for each role that needs the table (never anon unless I say it is public), alter table ... enable row level security, and a policy for each action that checks auth.uid(). Never fix a permission error by turning off RLS or by granting every table to every role. Please remember this rule for this project.
Review who can reach each table
List every table in my Supabase public schema with the privileges granted to anon and authenticated (use information_schema.role_table_grants). Mark each table as public or private. For private tables, revoke everything anon has. For every table, confirm RLS is on and show its policies. Do not change anything until I confirm the plan.

10. FAQ

What changes in Supabase on October 30, 2026?

Supabase says that on October 30, 2026 it applies a new default to all existing projects: new tables you create in the public schema are not reachable through the Data API until you add an explicit Postgres GRANT. The Data API is what supabase-js and the other client libraries use. New projects have had this default since a rollout that started May 30, 2026.

Why does Supabase say "permission denied for table"?

That is error 42501. It means the role making the request (anon for logged-out visitors, authenticated for signed-in users) is not allowed to do that action on the table. After the October 30 change, the most common cause is a new table with no GRANT. It can also come from an RLS policy that blocks an insert or update, from column-level limits, or from asking for a schema the API cannot reach, like auth or vault.

Will my existing Supabase tables stop working on October 30?

No. Supabase says tables you already have keep their current grants and stay reachable. The change only affects new tables you create in the public schema after the change reaches your project.

Should I turn off RLS to fix error 42501?

No. Turning off RLS does not add a missing grant, so it will not fix a missing-grant error. And once the table has a grant, RLS off means anyone with your public key can read and change every row. Add the grant, keep RLS on, and add a policy.

Do I need to grant my table to anon?

Only if logged-out visitors really need it, like a table of published blog posts. For private data, grant to authenticated and service_role only, and use an RLS policy so each user only reaches their own rows.

Can I just run "grant all on all tables" to make the error go away?

That gives every role access to every table in public at once, including tables you meant to keep private. Supabase lists a bulk grant as a way to roll back to the old behavior, and says to revoke private tables one by one afterward. It is safer to grant table by table, only what each role needs.

Does this change affect Supabase Storage or Auth?

Supabase says no. The change is about default privileges in the public schema. Tables in storage, auth, realtime and custom schemas keep their current grants and defaults.

My app uses a direct Postgres connection. Am I affected?

Supabase says no. If your app only talks to the database over a direct connection (psql, an ORM or a server with a connection string), this change does not affect you. It is about the Data API.

More questions? See the VibeCheck FAQ. Also useful: Supabase RLS check · Is my Lovable app safe? · Is my Bolt app secure? · Is my Cursor app secure?