Rezin Core Rezin Core

Blog/26 November 2026

Tables that start closed: what default-locked access rules prevent

Rezin Core · 26 November 2026 · 4 min read

When personal data leaks from an application's database, the story people imagine is an attacker breaking in. The research tells a duller and more worrying story: in a great many cases nobody broke anything. The data was readable all along, because a table was never locked.

What the research found

In 2026, UpGuard Research published what it called the largest study of its kind, "Everything Everywhere: Systemic Data Exposure in Supabase Apps". Starting from about 300,000 domains that showed signs of using one popular backend platform, they found 16,326 databases exposing readable tables. By looking at table structures, they estimated that 55.8% of those databases held some personal information and 9.7% held what they called hard credentials. The examples they followed up included a consulate's records of 25,000 people and a customer database of more than 100,000.

The same pattern shows up on a different platform. A researcher writing as MrBruh scanned the top 1.5 million Android apps and reported, in "Firewreck 2.0", 11,126 insecure Firebase instances exposing 1,432,693,875 user records.

Why it keeps happening

UpGuard's explanation is worth quoting for its precision. The platform they studied now turns row-level security on by default for tables created in its table editor. But, they write, tables created programmatically through the API "do not enable RLS by default", and that is how coding assistants create tables.

So the protection depends on which door the table came in through. A person clicking in a dashboard gets a locked table. A script, a migration or a coding assistant may get an open one, and the person in charge may never know there was a choice.

There is a second trap. These platforms hand the application a public key that is meant to be shipped in client code. That is safe only if every table is guarded by rules. With one unguarded table, the public key reads it.

And a third: having row-level security switched on is not the same as having good rules. UpGuard notes that policies can exist and still not restrict access adequately. A rule that says "anyone signed in may read everything" passes a checkbox and protects nothing.

What "closed by default" means

The fix is not a cleverer feature. It is a different starting position: a new table should give nothing to the application until someone says who may read it.

In Rezin Core, a new table has row-level security on and no rule, whichever way it was made: in the table editor, with your own SQL, by a migration, or by a coding assistant through the connector. The result is an application that gets no rows from it. That is inconvenient for about a minute, and the inconvenience is the point. You open the table on purpose, by choosing a rule:

for everything
using       organization_id = core.app_org()
with check  organization_id = core.app_org()

That one, from a template, lets a signed-in user reach the rows of their own organization and no others.

Around that default are three things meant to catch what a default cannot:

What a default cannot do

It is worth being exact about the limits, because a security feature that is oversold becomes its own risk.

The default can be undone. You can turn row-level security off for a table, after confirming that you mean to. The advisor will then list that table as open, but it will not stop you.

A default also cannot write good rules for you. A table opened with a rule that lets everyone through is as exposed as one never locked. The advisor flags the obvious cases; it cannot know what your application means.

A short checklist for any platform

If you run an application on any hosted backend, these take a few minutes:

  1. List every table and check that row-level security is on for each one.
  2. For each table, read the rules and ask what a stranger holding your public key could do.
  3. Try it. Use your public key, with nobody signed in, and request each table.
  4. Look for tables created by scripts, migrations or assistants. Those are the ones most likely to have missed the default.
  5. Check that no secret key appears in client code.

The studies above suggest that step 3 alone would have caught thousands of the exposures they found.

Sources

More on how this works in Rezin Core: Row-level security and policies and Why was this refused?.