# Security review for apps built with Lovable

> Rare Agentics is a UK software and AI agent engineering firm that reviews apps built with Lovable. We start with the database, checking that every table has row level security and that each policy limits a signed-in user to their own rows. Every finding is reproduced and ranked in a written report. A review takes 1 to 3 weeks.

Source https://rareagentics.com/security-review-for-ai-built-apps/lovable. Last reviewed 2026-12-04.

## What does Lovable set up for you?

Lovable writes the front end and the backend from your prompts. Its documentation says apps created from 13 May 2026 use TanStack Start and render on the server, while older apps use React with Vite and render in the browser. Data sits in PostgreSQL, either in Lovable’s built-in backend, which uses Supabase’s open-source foundation, or in a Supabase project you connect yourself.

## Where do apps built with Lovable usually go wrong?

- **A table with no row level security.** The publishable key ships in the browser by design, so the database rules are the only thing between a visitor and your tables. Supabase says a table in an exposed schema without row level security can be read and written by any role with a grant on it. CVE-2025-48757 records this pattern in sites generated by Lovable up to 15 April 2025, and the record notes that Lovable disputes it because each customer is responsible for protecting their own app’s data.
- **A policy that lets everyone in.** Row level security can be switched on and still protect nothing if the policy condition is always true. Lovable’s own database check and Supabase’s Security Advisor both flag this, and it is easy to accept as a quick fix when a feature stops working.
- **A policy that checks sign-in but not ownership.** A rule that only asks whether someone is signed in lets every customer read every other customer’s rows. Supabase’s documentation explains that the with check condition is what stops a user creating a row for someone else or reassigning one, so a loose check lets one customer write into another’s account.
- **Views and functions that skip the rules.** Supabase documents that views bypass row level security by default, and its advisor flags database functions that run with the owner’s rights and can be called without signing in. A reporting view added late in the build can expose a table whose own policies are correct.
- **Server functions that trust the caller.** A secret key bypasses every row level security policy, which is why it belongs only in server-side code. A function that uses it has to check who is calling and what they own, because the database will no longer do it.
- **Rules enforced only on the page.** Older Lovable apps render in the browser, so a hidden admin page or a disabled button is a display choice and not a control. Anyone can send the same request straight to the API with the publishable key.

## What do we check in a Lovable app?

1. **Every table, as three different people.** We call the API as a visitor, as one test customer and as a second test customer, and record exactly which rows each can read, add, change and delete.
2. **Each policy, line by line.** We read the using and with check conditions on every policy and look for always-true rules, missing ownership tests and rules that rely on data the user can edit.
3. **Views, functions and storage buckets.** We check views, database functions and public buckets for routes around the table policies, including buckets that allow anyone to list their files.
4. **Keys in the bundle and the repository.** We search the published JavaScript and the full Git history for secret keys and third-party tokens, and confirm which ones need rotating.
5. **Server functions and outside services.** We read each server function for its own authorisation check, its input validation and what it sends to payment, email and AI providers.
6. **Sign-in, recovery and invitations.** We test sign-up, password reset, email change and invitation flows for account takeover, and check settings such as leaked password protection.
7. **Limits on forms, sign-in and AI features.** We check whether anything stops a script from hammering a login, a form or a paid AI call.
8. **What Lovable’s own checks already found.** We read the findings in Lovable’s Security view and confirm each one by hand. Lovable’s documentation says its checks cannot replace a full security review.

## What can you check in your Lovable app today?

1. **Run the checks in the Security view.** Open More, then Security, and run the checks. Read every Critical finding before you publish again.
2. **Read the policies on every table.** Open More, then Database, then Manage, then Policies. Every table that holds customer data should have a rule, and no rule should let everyone in.
3. **Try to read one test account from another.** Create two test accounts in your own app. Sign in as the first, copy the address of a record, then sign in as the second and open that address.
4. **Search your published site for secret keys.** Open your own live site, view the page source and the loaded scripts, and search for sb_secret and for the names of any paid services you use. A secret key should never appear. A publishable key is expected there.
5. **Move pasted keys into Secrets.** If you ever pasted an API key into the chat or the code, store it under More, then Secrets, and create a fresh key with the provider so the old one stops working.
6. **Turn on leaked password protection.** Switch on the Password HIBP check in your sign-in settings so that passwords already seen in known breaches are refused.

## Questions

### Do we have to rebuild our Lovable app?

Rarely. Most Lovable apps need targeted fixes such as tighter policies, a key moved into a server function and limits added. If a rebuild is the honest answer we will say so in the report and explain why.

### Lovable already has a security scanner. Why would we need a review?

The scanner is worth running and we start from its findings. Lovable’s documentation says you are still responsible for your app’s security and that its checks cannot guarantee the app is secure or replace a full security review. We test the running app as real users would and reproduce each finding.

### Does CVE-2025-48757 mean Lovable is unsafe?

No. The record describes generated sites whose tables lacked sufficient row level security, and Lovable disputes it on the grounds that each customer protects their own data. Lovable now runs database checks before you publish. The practical point is that the rules on your tables are yours to get right, and they can be tested.

### Does it matter whether we use Lovable’s built-in backend or our own Supabase project?

The checks are the same because both store data in PostgreSQL behind the same kind of row level rules. With your own Supabase project we also review the project settings, the API keys and who has access to the dashboard.

### Is the review a penetration test?

No. It is an engineering-led review of your code, database rules and configuration, with every finding reproduced. It is not a certification. If a customer or investor needs a certified penetration test we will say so and work alongside the firm you choose.

## Sources

1. [CVE-2025-48757](https://www.cve.org/CVERecord?id=CVE-2025-48757), CVE Program (MITRE)
2. [Security overview](https://docs.lovable.dev/features/security), Lovable
3. [Built-in backend](https://docs.lovable.dev/features/cloud), Lovable
4. [FAQ](https://docs.lovable.dev/introduction/faq), Lovable
5. [Row Level Security](https://supabase.com/docs/guides/database/postgres/row-level-security), Supabase
6. [API keys](https://supabase.com/docs/guides/getting-started/api-keys), Supabase
7. [Advisors](https://supabase.com/docs/guides/observability/advisors), Supabase

---

Rare Agentics is a UK software and AI agent engineering firm based in London. Rare Agentics Limited, company number 17494524. Contact hello@rareagentics.com or https://rareagentics.com/contact. Book a call at https://rareagentics.com/book-a-call.
