Back to Blog
Industry

Lovable Didn't Leak 200K Messages. The Missing Reviewer Did

The Lovable leak wasn't bad AI code. A missing row-level security policy breaks nothing for the author, and solo founders no longer have a second person who reads the code cold and asks who else can get in.

OPC Community

OPC Community

Nov 7, 2026 8 min read
Lovable Didn't Leak 200K Messages. The Missing Reviewer Did

We automated the author and quietly fired the only person whose job was to ask who else could get in.

Every app in the Lovable exposure passed its test. A founder typed a prompt, clicked around the preview, watched their messages load, and shipped.

That was a real test. It just tested the wrong person. This week a research write-up from Crissy Field documented Lovable-built apps exposing passport details and more than 200,000 private messages, and you can already guess the takes. Vibe coding is unsafe. Amateurs shouldn't ship software. The generator writes bad code.

I think that reading is wrong, and wrong in a way that sets up the next leak.

The Generator Did Its Job

Start with how these apps get built. Lovable wires your frontend to a Supabase database, and the browser talks to that database directly, using a key that ships inside the JavaScript bundle. Anyone who opens dev tools can read it. That's how Supabase designed it. The key is public on purpose.

Which leaves exactly one lock: row-level security policies, the rules in the database that say which user can see which row. Get them right and the public key is harmless. Leave them off, or write one that says "anyone logged in can read everything," and your whole database is a public API.

Here's the detail that matters. A missing policy breaks nothing. The app loads, the chat works, and the founder sees their own messages, which is exactly what they expected to see. No red text. No failed build. No symptom of any kind.

The failure only exists if you are somebody else.

So "it works" is a much narrower claim than it sounds. It says the app behaves correctly for its author, logged in as themselves, doing what they meant to do. Security is a claim about everyone else, and a preview window can't show you everyone else. It isn't built to. The model can't see it either, when the prompt was "build me a chat app" and success meant the chat showing up.

The generator produced working software. Nobody asked the second question.

Review Was Never Designed. It Was a Side Effect

Asking that second question used to be somebody's job. Nobody ever wrote it into the job description, though.

On a normal engineering team, code gets to production through a pull request, and a pull request needs a second human. We tell ourselves that person is there to catch bugs. Mostly they aren't. Studies of code review at Microsoft found that only a minority of review comments concern defects at all.

The valuable thing about the reviewer was simpler: they hadn't written the code. They had no memory of what the author meant. They read the endpoint cold and asked what a stranger would ask. Wait, who can call this?

Nobody designed that question as a security control. It fell out of how teams were staffed. Code was expensive, so companies hired several people to write it, and once you have several people, someone other than the author looks before it goes live. The control came free with the org chart.

Then the org chart went to one. A solo founder with Lovable has no second engineer and no pull request, and there's nobody left in the building to read the thing cold. You can't even say the reviewer got fired. The role only ever existed as a side effect of something else, and the something else is gone.

This is why I don't buy the "AI writes insecure code" framing. Humans write this exact bug all the time. In 2018, researchers at Appthority found more than 2,300 Firebase databases open to the internet, exposing around 100 million records, all hand-coded by professionals. Last summer the Tea app leaked 72,000 images, including about 13,000 selfies and photo IDs, from an open Firebase bucket. Tea said the data sat in a legacy storage system that predated any vibe coding tool.

The open-database bug is fifteen years old. What's new is how many people can ship one, and that none of them have a colleague.

A Scanner That Checks for a Lock Is Not a Reviewer

Lovable has heard this before. In May 2025, Matt Palmer published CVE-2025-48757 after scanning 1,645 apps from Lovable's own showcase. He found 170 of them, about one in ten, exposing data through missing or broken row-level security.

Lovable had already shipped a security scan by then. Palmer's disclosure spelled out what it actually did: it flagged whether a policy existed. Whether the policy was correct, it never checked.

This whole essay hangs on that distinction. A presence check asks if there's a lock on the door. A reviewer asks if the lock opens for strangers. A policy that reads using (true) passes the first check and hands over every row.

The scan was also advisory. It warned, it didn't block. And a warning the author can dismiss puts the author right back in charge of judging their own work, which is the arrangement we started with.

Real review has two properties, and most of what gets sold as "AI security" has neither. First, the reviewer is independent: it doesn't share the author's intent or the author's context. Second, the reviewer has a veto. The code doesn't ship until the objection is answered.

Ask the same model, in the same session, "is this secure?" and you've failed the first one. It reads its own code with its own assumptions and tells you what you both already believed. A dismissible banner fails the second.

The Review Layer Is Coming Back as a Product

The same day the Lovable research was making the rounds, Alibaba's open-code-review was trending on GitHub. Its design is deterministic pipelines plus an LLM agent, and I think that split is the right one.

Some review questions have answers. Does this table have row-level security enabled? Does any policy evaluate to true for every caller? Is a service key sitting in the client bundle? Don't ask a language model any of that. Query the database, grep the build, and get the same answer every time. Hand factual questions to a probabilistic system and you get a reviewer that approves on Tuesday what it blocked on Monday.

Other questions take judgment. Does this policy match what the founder meant by "users can see their own bookings"? Is this table, named profiles, actually holding passport scans? That's where the agent earns its place, reading for intent the way a colleague would.

I don't read the trend as one more tool. I read it as a correction. For two years the money went into the author: faster generation, bigger context, whole apps from a sentence. The reviewer got nothing, because nobody knew there had been one. Now the missing role is being rebuilt as software, and it has to be, because the solo founders it used to serve are not going to hire a second engineer just to get review back.

Where should it live? My answer: inside the platform, on the publish button, with the power to refuse. Lovable's customer is, by design, someone who can't evaluate a row-level security policy. Telling that customer security is their responsibility is like selling a car without brakes and pointing at the manual. If you sell "no engineer required," you've taken on the engineer's obligations, including the one nobody listed.

Be the Stranger for Ten Minutes

Until the platforms do this, you are your own reviewer, and you're badly placed for it. You know what the app is supposed to do. That's the handicap.

So stop testing as yourself.

Open your deployed app, open dev tools, and find the Supabase URL and anon key in the network tab. It takes about a minute, and an attacker needs no longer. Then, from a terminal with no login at all, ask the database for your most sensitive table:

`` curl "https://YOUR-PROJECT.supabase.co/rest/v1/messages?select=*" \ -H "apikey: YOUR_ANON_KEY" ``

If rows come back, you have the Lovable bug. Run it for every table.

Next, make two accounts. Log in as the first, copy its session token, and request the second account's rows by ID. If you get them, your policies check that a user is logged in without checking who they are. This is the more common failure, and a presence scan never sees it.

Do both before you launch, and again after every schema change. Then have a different model, in a fresh session with no build history, read your policies and describe in plain English who can read each table. If the description surprises you, the policy is wrong.

It's a crude substitute for a colleague. But it gets back the part that mattered, a reader who doesn't know what you meant.

What "It Works" Was Hiding

Here's the uncomfortable part for those of us who ship alone. Nearly all the confidence we have in our own apps comes from watching them do what we asked. That feeling is real, and it tells you nothing about security. The founders in that write-up felt it too.

So go back to the opening scene. The founder clicks through the preview, the messages load, and the app works.

It worked for the researcher too. A leak is your app working for the wrong person, and for decades the only defense was a colleague who read your code without knowing what you meant by it.

We built machines to write the code. This week we learned what the reader was for.

Frequently Asked Questions

Why did Lovable apps expose private messages and passport details?

Lovable connects the frontend directly to a Supabase database using a key that ships in the JavaScript bundle and is public by design. The only lock is row-level security, and a missing or overly broad policy (such as using (true)) turns the whole database into a public API. Nothing breaks for the founder, who still sees only their own data, so the failure is invisible unless you are somebody else.

How do I check whether my Lovable or Supabase app is leaking data?

Find your Supabase URL and anon key in the browser's network tab, then use curl with no login to request each sensitive table; if rows come back, you have the bug. Next, create two accounts and use the first account's session token to request the second account's rows by ID, which catches policies that check for a login without checking who the user is. Repeat both before launch and after every schema change, and have a different model in a fresh session describe in plain English who can read each table.

Is AI-generated code less secure than code written by humans?

The article argues that this framing is wrong: the open-database bug is fifteen years old, and professionals have hand-coded it many times, including more than 2,300 exposed Firebase databases found in 2018 and the Tea app leak. What changed is how many people can ship that bug, and that a solo founder has no colleague to read the code cold. The fix is a reviewer that is independent of the author and can block publishing, not a dismissible scan that only checks whether a policy exists.

Share this article

Join the OPC Community

Connect with solo founders worldwide. Get daily insights, curated opportunities, and peer support.

Join free