<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>DEV Community: Karthikein M R</title>
    <description>The latest articles on DEV Community by Karthikein M R (@karthikkushi).</description>
    <link>https://dev.to/karthikkushi</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F4204146%2F56424e5e-5a82-454a-b7f6-dd88d20856f1.png</url>
      <title>DEV Community: Karthikein M R</title>
      <link>https://dev.to/karthikkushi</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/karthikkushi"/>
    <language>en</language>
    <item>
      <title>Supabase's 30 Oct 2026 change: 'permission denied for table' and the one-line fix that leaks your data</title>
      <dc:creator>Karthikein M R</dc:creator>
      <pubDate>Sat, 24 Oct 2026 07:37:05 +0000</pubDate>
      <link>https://dev.to/karthikkushi/supabases-30-oct-2026-change-permission-denied-for-table-and-the-one-line-fix-that-leaks-your-47dp</link>
      <guid>https://dev.to/karthikkushi/supabases-30-oct-2026-change-permission-denied-for-table-and-the-one-line-fix-that-leaks-your-47dp</guid>
      <description>&lt;p&gt;On &lt;strong&gt;30 October 2026&lt;/strong&gt;, Supabase stops giving new tables in the &lt;code&gt;public&lt;/code&gt; schema automatic access through the Data API (the REST and GraphQL API that &lt;code&gt;supabase-js&lt;/code&gt; uses). It applies to all existing projects. New projects have had this default since 30 May. Source: &lt;a href="https://supabase.com/changelog/45329-breaking-change-tables-not-exposed-to-data-and-graphql-api-automatically" rel="noopener noreferrer"&gt;Supabase changelog&lt;/a&gt; and &lt;a href="https://github.com/orgs/supabase/discussions/45329" rel="noopener noreferrer"&gt;GitHub discussion #45329&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;Tables you already have keep working. RLS works the same way. Direct Postgres connections are not affected.&lt;/p&gt;

&lt;p&gt;What changes: the next time you (or your AI agent) create a table, the app cannot read it until you add a &lt;code&gt;GRANT&lt;/code&gt;.&lt;/p&gt;

&lt;h2&gt;
  
  
  What you will see
&lt;/h2&gt;

&lt;p&gt;I ran this on a local Supabase (CLI 2.121.0). I turned off the default grants the way the changelog describes, created a new table without RLS, and called it with the anon key:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight json"&gt;&lt;code&gt;&lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="nl"&gt;"code"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="s2"&gt;"42501"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt;
 &lt;/span&gt;&lt;span class="nl"&gt;"hint"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="s2"&gt;"Grant the required privileges to the current role with: GRANT SELECT ON public.oct30_notes TO anon;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt;
 &lt;/span&gt;&lt;span class="nl"&gt;"message"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="s2"&gt;"permission denied for table oct30_notes"&lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The error is clear, and it suggests a fix. That suggested fix is the problem.&lt;/p&gt;

&lt;h2&gt;
  
  
  The trap: following the hint
&lt;/h2&gt;

&lt;p&gt;AI coding agents read error hints and act on them. So does a tired developer at 1 am. I ran exactly what the hint says:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight sql"&gt;&lt;code&gt;&lt;span class="k"&gt;grant&lt;/span&gt; &lt;span class="k"&gt;select&lt;/span&gt; &lt;span class="k"&gt;on&lt;/span&gt; &lt;span class="k"&gt;public&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;oct30_notes&lt;/span&gt; &lt;span class="k"&gt;to&lt;/span&gt; &lt;span class="n"&gt;anon&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Then I called the API again with the public anon key, the one that ships in your website's code:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight json"&gt;&lt;code&gt;&lt;span class="p"&gt;[{&lt;/span&gt;&lt;span class="nl"&gt;"note"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="s2"&gt;"A private note"&lt;/span&gt;&lt;span class="p"&gt;},&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="nl"&gt;"note"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="s2"&gt;"B private note"&lt;/span&gt;&lt;span class="p"&gt;}]&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Every row, for anyone on the internet. The table had no RLS, and &lt;code&gt;anon&lt;/code&gt; means "not logged in".&lt;/p&gt;

&lt;p&gt;The grant was not the mistake. The mistake was granting &lt;strong&gt;without&lt;/strong&gt; turning on RLS and adding a policy in the same step.&lt;/p&gt;

&lt;h2&gt;
  
  
  The safe fix
&lt;/h2&gt;

&lt;p&gt;Do all three in one migration:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight sql"&gt;&lt;code&gt;&lt;span class="c1"&gt;-- 1. Grant only what each role needs (anon only if logged-out visitors should read it)&lt;/span&gt;
&lt;span class="k"&gt;grant&lt;/span&gt; &lt;span class="k"&gt;select&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="k"&gt;insert&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="k"&gt;update&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="k"&gt;delete&lt;/span&gt; &lt;span class="k"&gt;on&lt;/span&gt; &lt;span class="k"&gt;public&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;oct30_notes&lt;/span&gt; &lt;span class="k"&gt;to&lt;/span&gt; &lt;span class="n"&gt;authenticated&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;

&lt;span class="c1"&gt;-- 2. Turn on RLS&lt;/span&gt;
&lt;span class="k"&gt;alter&lt;/span&gt; &lt;span class="k"&gt;table&lt;/span&gt; &lt;span class="k"&gt;public&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;oct30_notes&lt;/span&gt; &lt;span class="n"&gt;enable&lt;/span&gt; &lt;span class="k"&gt;row&lt;/span&gt; &lt;span class="k"&gt;level&lt;/span&gt; &lt;span class="k"&gt;security&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;

&lt;span class="c1"&gt;-- 3. Tie rows to their owner&lt;/span&gt;
&lt;span class="k"&gt;create&lt;/span&gt; &lt;span class="n"&gt;policy&lt;/span&gt; &lt;span class="nv"&gt;"users read their own notes"&lt;/span&gt; &lt;span class="k"&gt;on&lt;/span&gt; &lt;span class="k"&gt;public&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;oct30_notes&lt;/span&gt;
  &lt;span class="k"&gt;for&lt;/span&gt; &lt;span class="k"&gt;select&lt;/span&gt; &lt;span class="k"&gt;to&lt;/span&gt; &lt;span class="n"&gt;authenticated&lt;/span&gt;
  &lt;span class="k"&gt;using&lt;/span&gt; &lt;span class="p"&gt;((&lt;/span&gt;&lt;span class="k"&gt;select&lt;/span&gt; &lt;span class="n"&gt;auth&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;uid&lt;/span&gt;&lt;span class="p"&gt;())&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;user_id&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;After this, the anon key got &lt;code&gt;permission denied&lt;/code&gt; again, and a logged-in user A saw only their own note.&lt;/p&gt;

&lt;h2&gt;
  
  
  Tell your AI agent before 30 October
&lt;/h2&gt;

&lt;p&gt;Add a line like this to your agent rules (&lt;code&gt;CLAUDE.md&lt;/code&gt;, &lt;code&gt;.cursorrules&lt;/code&gt;, Lovable knowledge, or your system prompt):&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;When you create a table in Supabase, put the GRANT, &lt;code&gt;enable row level security&lt;/code&gt; and an owner policy in the same migration. Never grant to &lt;code&gt;anon&lt;/code&gt; on a table without RLS. Do not follow a "GRANT ... TO anon" error hint without checking RLS first.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;Supabase also offers an agent skill that includes the grant step (see the changelog).&lt;/p&gt;

&lt;h2&gt;
  
  
  Check what you already have
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;In the dashboard, the Table Editor shows a Data API exposure badge, and the Security Advisor lists tables to review.&lt;/li&gt;
&lt;li&gt;From the CLI: &lt;code&gt;supabase db advisors --type security&lt;/code&gt;.&lt;/li&gt;
&lt;li&gt;If you ever ran the "restore old behavior" bulk grant (&lt;code&gt;grant ... on all tables in schema public to anon ...&lt;/code&gt;), every table without RLS is open again. Check RLS on each table after a bulk grant.&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  What I use
&lt;/h2&gt;

&lt;p&gt;I combine three free checks: the Supabase Security Advisor for rules, &lt;a href="https://github.com/matte97p/rlsgrid" rel="noopener noreferrer"&gt;rlsgrid&lt;/a&gt; for user A vs user B, and &lt;a href="https://github.com/karthikkushi/karchi-guard" rel="noopener noreferrer"&gt;Karchi Guard&lt;/a&gt; (my open-source tool) for what an AI agent in the repo can reach. None of them proves an app is secure. Together they catch a lot.&lt;/p&gt;




&lt;p&gt;&lt;em&gt;Written by an AI agent (Claude) for me; every step was tested on a local Supabase.&lt;/em&gt;&lt;/p&gt;

</description>
      <category>supabase</category>
      <category>postgres</category>
      <category>security</category>
      <category>webdev</category>
    </item>
  </channel>
</rss>
