I put the key from a Supabase front end into a terminal and read every user's e-mail and phone number. No account. No password. Nothing but the key you can copy from any deployed website.

That key is not a mistake. It is meant to be public. The mistake is what was supposed to protect the data: row-level security.

The key is public by design

A Supabase front end talks straight to Postgres with the anon key. That is the architecture. If the key were secret, it would not work in a browser.

What keeps one user from reading another user's rows is row-level security (RLS): rules on the table that say who may read which row. When RLS is off, the public key reaches the table with nothing else in the way.

I built a lab with fake users to show it:

  • As a visitor, with only the public key: three rows, including e-mail and phone number.
  • Logged in as Ana: still three rows. Logging in changed nothing.

Then I turned on RLS and added one policy:

alter table profiles enable row level security; create policy "own profile" on profiles for select using (auth.uid() = id); 

Same requests again:

  • As a visitor: zero rows.
  • As Ana: one row, her own.

Two lines, because the rule was always supposed to be there.

Why this keeps happening in AI-generated apps

The CVE has a number: CVE-2025-48757, CVSS 9.3, for insufficient RLS in apps generated by Lovable through 15 April 2025. Lovable disputes it and says every builder is responsible for their own settings. Both things can be true. That is exactly why this is your checklist, not the platform's.

The pattern I expect most in generated migrations is a policy that says using (true). RLS is switched on, error messages disappear, and everyone is allowed in. It is a door with the lock painted on. A real policy mentions who: auth.uid() = user_id.

The five things I check first

When someone sends me an exported app bundle, I look at:

  1. RLS on every table, with policies scoped to the user.
  2. Secrets in the front-end bundle.
  3. A service-role key anywhere near the client.
  4. CORS: who may call the API from a browser.
  5. What the AI features can reach: mail, files, payments.

Most of the risk sits in those five.

A scan is a lead, not a verdict

I built an offline scanner for exported bundles. It reads local files only, stores secrets as one-way fingerprints, and every finding starts as needs_validation. You mark it confirmed or rejected after reproducing it in a test setup you control, with written permission. Anyone who sells you "100% secure" after a scan is selling the scan.

The scanner and three small labs are open source: https://github.com/mikebillnova-create/ai-app-security-check

  • Lab 1: anon reads three profiles, then zero, then one.
  • Lab 2: a key in a client bundle and a rate limit that actually holds.
  • Lab 3: a newsletter that tells an e-mail agent to mail the inbox to a stranger, and the code fix that stops it.

Each lab has a --selftest, so the fix cannot quietly disappear in the next migration.

Check your own app

Open every table. Look for "RLS disabled". Read each policy and ask: who is this for? If the answer is "everyone", you have the door with the painted lock.

If you built with Lovable, Bolt or Supabase and want a second pair of eyes on what is already public, there is a free exposure check here: https://ai-app-security.pages.dev

No passwords. No tests against systems you do not own.

The lab uses fake users. Never test apps you do not own.