LogicTrail
  • Trails
  • Check my app
  • Pricing
  • Sign in
  1. Trails
  2. /
  3. Who may see what
  4. · 5 minutes · Pro

The table anyone can read

Your app uses straight from the browser. A stranger posts a screenshot of your whole users table on X.

This answers: Why can anyone read my Supabase table? No coding needed. 3 quick decisions.

  • Who may see what
  • Where your data lives
  • Keys and secrets

Checking your access…

Why can anyone read my Supabase table?

Your publishable (anon) key ships to every browser on purpose. decides which rows that key may read or change. If RLS is off on a table, or a policy uses (true), anyone can query every row. Turn RLS on and write policies around auth.uid().

Trail of the bug
  1. Stranger
  2. Database

Breaks at Database: RLS off: the public key reads every row

How it works

What Maya's browser can readRow Level Security
OrderOwnerTotalMaya sees it?
#1042Maya£120Yes, hers
#1043Tom£80Yes: leaked
#1044Ana£215Yes: leaked
#1045Maya£42Yes, hers
With RLS off, any role granted access to the table, such as the public key, can read every row. Maya, or anyone with your site open, gets everyone's orders.

Why AI tools write this bug

When hides rows or blocks a write, the quickest way for an AI tool to make the problem disappear is to disable RLS or add a policy that allows everything. The app works again, for everyone.

How to fix it

  1. Enable on every table in the public schema.

3 more steps, and a prompt that checks your own app for this bug. Part of Pro.

Unlock

Common questions

Is it safe that the Supabase anon key is in my frontend?
Yes, if Row Level Security is on with correct policies. The key identifies your project; the policies are what protect the data.
Does a policy of auth.role() = 'authenticated' protect user data?
No. Anyone can sign up and become authenticated. Policies must compare the row's owner with auth.uid().

Related scenarios

  • One field, a million creditsPro · 4 min
  • Permission denied for tablePro · 4 min
  • The fix that made it worsePro · 5 min

More on this trail

Who may see what: Sign-in, permissions, and the leaks AI-built apps ship most often.

Want someone to look?

We check AI-built apps for this and three other common leaks, in plain English.

Check my app
Sign in

Sign in to walk this one

3 decisions, about 5 minutes, and a prompt to check your own app for the same problem.

Sign in No password. We email you a link.

How to fix it

  1. Enable on every table in the public schema.

3 more steps, and a prompt that checks your own app for this bug. Part of Pro.

Unlock