Is Lovable Safe? Security Issues in Lovable Apps (and How to Scan)
Lovable ships apps fast — but the common failures are predictable: Supabase RLS left off, service-role keys in the client, unprotected endpoints. Here's how to check yours, free.
· 7 min read
Short answer: Lovable itself is fine — but the apps it generates have shipped with real, exploitable holes, and they tend to be the same few every time. If you built something on Lovable and you're nervous, that's a healthy instinct. The good news is that the failure modes are predictable, which means they're also findable in a couple of minutes.
This isn't fear-mongering. In 2025, security researcher Matt Palmer disclosed CVE-2025-48757 after a scan found 303 endpoints across 170+ Lovable projects lacking proper database access controls — leaking emails, phone numbers, payment status, and even API keys, all reachable without logging in. A 2026 follow-up audit of 1,600+ Lovable apps still found more than 170 with fully exposed databases. The problem is real, specific, and worth five minutes of your time.
The 60-second version
Why Lovable apps end up insecure
Lovable turns a plain-English prompt into a full-stack app — usually React and Tailwind on the front end, with Supabase as the database and auth layer. That's a genuinely great stack. The trouble is that the AI optimizes for "does it work?", not "is it safe?" An app can look perfect — you only ever see your own data in the UI — while the database underneath is wide open to anyone who asks it directly. The UI is not the security boundary; the database rules are.
The three things that actually go wrong
1. Row-Level Security is off, so your data is public
Supabase exposes your tables through an auto-generated API. The only thing stopping a stranger from reading every row is Row-Level Security (RLS) — policies you have to explicitly turn on and write. When a table is created without RLS, the API happily returns everything to anyone holding the public anon key, which is embedded in your site's JavaScript by design.
That was the core of CVE-2025-48757: attackers didn't need special credentials — the public anon key let them query Supabase directly and dump entire tables like full user lists, payment records, or API keys, just by swapping the intended query. The nasty part is that the app works perfectly with RLS off. Nothing breaks, no error appears. You find out when someone else does.
2. A service-role or private key ends up in the browser
Supabase gives you two keys. The anon key is meant to be public and is safe only when RLS is on. The service-role key is the master key: it bypasses every RLS policy and can read and write your entire database. It must never leave the server. AI tools sometimes wire it into client-side code to "make things work," which is catastrophic — anyone can open DevTools and copy it. If you've seen this, read our deep dive on the exposed Supabase service-role key and rotate it immediately.
3. Endpoints and edge functions with no auth check
Lovable apps often add Supabase Edge Functions or API routes for sending email, processing payments, or calling a model. These are easy to ship without any authentication check — meaning anyone who guesses the URL can trigger them, run up your bills, or reach data they shouldn't. "It's not linked in the UI" is not protection; the endpoint is still on the public internet.
How to check your Lovable app
You don't need to be a security engineer. The quick manual pass:
- Check RLS in Supabase. In the Table Editor / Advisor view, every table with real data should show RLS enabled with at least one policy. A policy that lets anonymous users read everything is just as bad as no policy.
- Search your code for the service-role key. Grep for
service_roleandSUPABASE_SERVICE. If it appears anywhere the browser loads — or behindNEXT_PUBLIC_orVITE_— treat it as leaked and rotate it. - Test one endpoint without logging in. Call an edge function or API route in an incognito window. If it returns real data or performs an action, it's missing an auth check.
The trouble with doing this by hand is that it's easy to miss a table, a key in git history, or a route you forgot you added. That's what a scanner is for.
Scan your Lovable app — free, no signup
Paste your live URL and your GitHub repo. Trust checks both for exposed keys, RLS gaps, and open endpoints in about a minute.
Run a free scan →Trust scans both the live URL and the repo, for free. The live scan catches what's exposed on your running site — public database access, keys leaked into the bundle, missing auth. The repo scan catches secrets in your code and history (including a leaked Supabase service-role key), unsafe patterns, and vulnerable dependencies — with plain-language fixes.
None of this means you shouldn't use Lovable. Shipping in an afternoon is a genuine superpower. It just means the last five minutes — confirming RLS is on, keys are server-side, and endpoints check auth — are the difference between a live app and a leaked one. For the bigger picture, see is your AI-generated app secure?