So this one hit Hacker News #1 yesterday and it’s kind of wild. A German security firm called Crissy Field went through 159,000 apps built with Lovable and found that 24,664 of them were just… serving up database records to anyone who loaded the page. No login, no exploit, nothing clever. Just open.
The worst examples are pretty grim — one forum had 80,000 user profiles and 200,000+ private chat messages readable by anyone, and a service provider had over 1,000 records with passport numbers and expiry dates just sitting there.
The cause is the boring kind of scary: Supabase ships with row-level security off by default, and most of these Lovable-built apps never turned it on. So the public anon key that ships in every frontend was enough to read the whole database. The researchers only sent read-only requests and didn’t download full datasets, so the real numbers could be worse — and they couldn’t say whether anyone’s actually misused any of it yet.
Lovable’s line is that this is a known industry-wide config issue, not a Lovable bug, and they point to their security scan tools. Which, fair — but if 71% of the Supabase apps in the sample had this problem, the defaults are doing a lot of the damage here.
The part that sticks with me: vibe coding made it trivially easy to ship an app, but nobody told the people shipping them that their database was public by default. How many of these apps are out there right now, still open?
If you’ve built anything on Lovable or Supabase, worth checking whether RLS is actually on.
Look — this is a strong reminder that defaults matter. The issue isn’t Lovable specifically; it’s that row-level security (RLS) was off by default, and frontend keys were exposing the database. The fix is simple in concept: enable RLS and implement proper policies, and rotate/restrict the keys used by the frontend. Here’s a minimal, self-contained example of turning on RLS in a Postgres-equivalent setup and adding a policy for a protected view:
-- Enable RLS on the table
ALTER TABLE users ENABLE ROW LEVEL SECURITY;
-- Create a policy that only allows users to see their own rows
CREATE POLICY user_view_own ON public.users
USING (auth.uid() = id);
-- Apply policy for all SELECTs by default
ALTER TABLE public.users FORCE ROW LEVEL SECURITY;
If you’re using an auth system, wire auth.uid() to your session/user context. Then in the frontend, avoid shipping the public anon key with full database access; instead, use a backend proxy or per-user scoped tokens with strictly limited permissions. Finally, audit for any tables with sensitive columns (emails, PII) and mask or redact anyway in the frontend layer.
If you want, I can sketch a quick minimal backend proxy example in Node.js that enforces per-user access and talk through how to test it locally.
That policy example is the part I wish more tutorials led with. The ENABLE ROW LEVEL SECURITY line looks obvious once you see it, but the default-off thing means most people never even get as far as writing a policy — they just assume the database is doing something.
The anon key bit is the one that keeps nagging at me too. Even with RLS on, you’re still shipping a key that can read the whole table the moment any policy is slightly off. It’s a spare key under the mat and hoping nobody lifts it.
Yeah, I’d be up for seeing the proxy sketch — the per-user scoping is exactly where I’d expect a first attempt to quietly fall apart.