PatchPaste · Guides
Last updated 6 November 2026
CVE-2025-48757: how to check your Lovable app
CVE-2025-48757 is about Lovable apps on Supabase whose Row Level Security was missing or too weak, so strangers could read (and sometimes write) data with the public anon key. Here is what the disclosure said, and a 10-minute check of yours.
using (true) on private data.What CVE-2025-48757 said
Matt Palmer published the statement on 29 May 2025 at mattpalmer.io. Figures below are from that write-up:
- Discovered while looking at a Lovable-built site on 20 March 2025. Changing a client query returned the whole
userstable. The root cause was absent RLS, not a leaked secret key (the anon key is meant to be public). - A homepage scan of 1,645 projects listed on Lovable Launched, completed on 21 March 2025, found 303 endpoints across 170 projects (about 10.3%) with inadequate RLS.
- Examples of exposed endpoints included
/rest/v1/users,/rest/v1/transactions,/rest/v1/subscriptions, and in some cases functions that returned API tokens. - The scan only hit homepages and did not sign in. Palmer notes authenticated sessions could expose more.
- A follow-up in May 2025 on a maintained site showed that removing the auth header could bypass controls and allow writes, including setting
payment_statustopaid. - Lovable was notified on 21 March 2025. Lovable 2.0's security scan shipped on 24 April 2025. Palmer's view: that scanner checked that an RLS policy exists, not that it is correct.
This page does not reproduce exploit steps. If you need the disclosure timeline, read Palmer's statement.
Why it happens on Lovable + Supabase
A Lovable app talks to Supabase from the browser with the project URL and the anon (or publishable) key. That key is designed to be public. What stops a stranger reading your tables is Row Level Security. Supabase's Security Advisor says that if RLS is off on a table in the public schema, anyone with the project URL can create, read, update and delete its rows. RLS with using (true) is just as open. For that trap, see RLS using (true).
Check your app in about 10 minutes
1. Lovable Quick and Deep scans (2 minutes)
In the project Security view, run the Quick and Deep scans. Fix findings about database access rules first. Lovable's docs say these scans do not replace a thorough review for sensitive apps.
2. Supabase Security Advisor (3 minutes)
In the Supabase dashboard, open Security Advisor. Fix these first (names from Supabase's Advisors reference):
- Table publicly accessible (
rls_disabled_in_public): RLS off on a public table. - Sensitive data publicly accessible (
sensitive_columns_exposed): RLS off on a table with password-, token- or ID-like columns. - Security policy allows unrestricted access (
permissive_rls_policy): a policy likeusing (true). - View bypasses row-level security (
security_definer_view): a view inpublicthat ignores RLS.
3. Test as a stranger (3 minutes)
Open the live app in a private window, logged out, and click through. Anything private that appears, a stranger can see too. For a sharper one-table test with the public key, use the logged-out curl steps in the Supabase RLS check.
4. Test as a second user (2 minutes)
Create two test accounts. Add data as A. Sign in as B and try to open A's records by changing an ID in the URL. B should see nothing of A's. No outside scanner can do this for you.
5. Scan the live URL from outside (1 minute)
An outside-in scan looks at the published app the way a stranger would: secret keys in the shipped JavaScript, common Supabase tables that answer to the anon key without a login, exposed /.env, /.git and source maps, and security headers. It does not sign in, so it complements steps 1 to 4 rather than replacing them.
How to fix what you find
- Turn RLS on for every public table, then add policies for the signed-in user. Supabase's recommended form:
alter table public.orders enable row level security; create policy "Users read their own orders" on public.orders for select to authenticated using ( (select auth.uid()) = user_id );
- Replace
using (true)on any table with personal data. Keep it only on tables that really are public. - Remove any service_role or
sb_secret_key from frontend code and rotate it. It bypasses RLS. See service_role key exposed. - Test again logged out and as the second user after every AI edit. Turning RLS off to clear a permission error is how fixed apps break again.
A prompt to paste into Lovable
Review every table in my Supabase database for the CVE-2025-48757 class of mistakes. For each table in the public schema: 1) enable Row Level Security; 2) replace any policy that uses USING (true) or WITH CHECK (true) on a table holding personal or private data with policies "to authenticated" that compare (select auth.uid()) to the owner column; 3) keep public read access only on tables that are genuinely public (list them for me first and wait for my OK). Do NOT disable RLS, do NOT add policies for the anon role on private tables, and do NOT use the service_role or any secret key in frontend code. Then list every table with its RLS status and policies.
Related: the November 2026 Crissy Field / Handelsblatt study on the same class of risk (Lovable apps exposing data), is my Lovable app secure?, and the pre-launch checklist.
CVE-2025-48757 FAQ
What is CVE-2025-48757?
It is a disclosure published on 29 May 2025 by Matt Palmer about Lovable-built apps that talk to Supabase from the browser. The issue was not a break-in to Lovable itself. Many apps had no Row Level Security, or policies that did not match what the UI promised, so anyone with the public anon key could read (and in some cases write) tables such as users or transactions.
Was Lovable hacked?
No. The CVE describes apps whose own database rules left tables open. Lovable apps call Supabase from the browser with a public anon key, which is by design. What stops a stranger reading your data is RLS. Without it, or with a weak policy, the public key is enough.
What did the March 2025 scan find?
Matt Palmer's write-up of CVE-2025-48757 says a homepage scan of 1,645 Lovable Launched showcase projects, completed on 21 March 2025, found 303 endpoints across 170 projects (about 10.3%) with inadequate RLS. The scan only looked at homepages and did not sign in.
Does Lovable's security scanner fix this?
Lovable later added Quick and Deep scans. Palmer's statement says the early scanner "merely checks for the existence of any RLS policy, not its correctness". Lovable's own docs say these scans do not replace a thorough review for apps that handle sensitive data. Still run them, then check policies by hand and test as a stranger.
How is this different from the November 2026 Crissy Field report?
Same class of risk, different study. CVE-2025-48757 (May 2025) came from a showcase homepage scan. Crissy Field with Handelsblatt (2 November 2026) looked at Common Crawl Lovable projects and found email-containing records on 7,403 of 24,664 sites that already sent Supabase data on page load, with the authors' caveat that this is not a confirmed leak rate. See the Crissy Field check guide for that report.
Can PatchPaste tell me if I was in the CVE scan?
No. PatchPaste does not have Palmer's list and does not know which apps were checked. Its free scan looks at your live URL from outside: whether common Supabase tables answer to your public anon key without a login (at most one row, discarded), and whether a service_role or other secret key is in your JavaScript. It cannot sign in or read your policies.
Check your Lovable app for free
Paste your live URL for a free A to F report. PatchPaste checks whether common Supabase tables answer to your public anon key without a login (read-only, at most one row, discarded), searches the JavaScript your site sends for secret keys, and flags exposed .env/.git/source maps and missing headers. Fix prompts for that report are a one-off £9 (or £29 for 10). Scans are free to rerun after you change policies and redeploy. It cannot tell you whether you were in the 2025 CVE sample.
Want to see one first? View a sample report.
Sources (checked 6 Nov 2026): Matt Palmer, Statement on CVE-2025-48757 (29 May 2025; all scan figures, timeline and limits above); Supabase, Advisors; Supabase, Row Level Security; Supabase, API keys; Lovable, Security overview.