{"slug": "lovable-security-is-lovable-safe-and-what-your-app-still-needs", "title": "Lovable security: is Lovable safe, and what your app still needs", "summary": "A scan of 1,645 Lovable-built apps found 170 with missing or weak row-level security (RLS), roughly one in ten, the vulnerability tracked as CVE-2025-48757, because Lovable apps read their PostgreSQL database from the browser using a public key. Lovable holds SOC 2 Type II, ISO 27001:2022 and AIUC-1 certifications and runs a Quick scan on every publish plus an on-demand Deep scan, but both are static analysis and neither checks what a signed-out stranger can actually reach. Apps created since May 13, 2026 run on TanStack Start with server code, and server code using an admin key skips RLS and must enforce ownership itself.", "body_md": "In short\n\n- Lovable runs the hosting, the builder, the database server and the scanners. Your app's access rules, secrets and code logic are yours: its own docs say you are responsible for meeting the security needs of your use case.\n- Lovable apps read their database from the browser with a public key, so RLS on each table is the main lock. In CVE-2025-48757, 170 of 1,645 Lovable apps scanned had missing or weak RLS, about one in ten.\n- The Quick scan runs on every publish and checks database rules, critical dependency flaws and exposed MCP servers, but not your code. The Deep scan reads the code and runs only when you start it.\n- Both built-in scans are static analysis. To know what a stranger gets, test the published app from outside, signed out and with a second account.\n- Apps created since May 13, 2026 run on TanStack Start with server code. Server code that uses an admin key skips RLS and must check ownership itself.\n\n## Is Lovable safe? The short answer\n\nYes for the platform, with conditions for your app. Lovable writes the code, hosts the app and runs the database for you, and it holds SOC 2 Type II, ISO 27001:2022 and AIUC-1 certifications. It is not HIPAA compliant and does not sign the business associate agreements HIPAA requires. What it cannot decide for you is who may read which rows, which values belong on a server, and what each function should refuse. Its security documentation says so plainly: you are responsible for making sure your app meets the security requirements of its use case, especially when it handles sensitive data.\n\nMost public Lovable security issues are of that second kind. The best known, [CVE-2025-48757](https://keybrum.com/cve/cve-2025-48757), came from a scan of 1,645 Lovable apps in which 170 had missing or weak RLS. The platform itself has had one widely reported problem too, covered below. So the honest answer has two parts: what Lovable runs, and what you ship.\n\n## What Lovable is responsible for, and what you are\n\n| Area | Lovable handles | You handle | \n|---|---|---|\n| Hosting and the builder | Servers, deploys, accounts, the project visibility setting | Who is in your workspace, and keeping projects private | \n| Database | A managed PostgreSQL database, daily backups, the database password (rotated when you ask) | The RLS policies that decide which rows each user can read or change | \n| Secrets | Encrypted storage, injected into edge functions, never sent to the browser | Putting secret keys in Secrets, never in frontend code or `VITE_` variables | \n| Generated code | Writing it, and changing what you ask for | Checking that each function and server route refuses the callers it should refuse | \n| Security scans | Quick scan on every publish, Deep scan on demand, optional Wiz and Aikido connectors | Running the Deep scan, reading the findings, fixing them | \n\n## The stack Lovable builds, and where it leaks\n\nLovable apps created from May 13, 2026 (June 22, 2026 for Enterprise workspaces) use TanStack Start, which renders pages on the server. Older apps use React with Vite and render in the browser. There is no choice of framework. The data lives in PostgreSQL, either in Lovable's built-in backend, which its docs describe as built on Supabase's open-source foundation and enabled by default, or in a Supabase project you connect yourself. The built-in backend adds sign-in, file storage, realtime updates and edge functions: small server programs that run your AI features, emails and payments.\n\nThe browser talks to the database directly. The project URL and the public key sit in `.env` as `VITE_SUPABASE_URL` and `VITE_SUPABASE_PUBLISHABLE_KEY`, are built into the JavaScript bundle and, per Lovable's docs, are safe to be public. Like the [Supabase anon key](https://keybrum.com/guides/supabase-anon-key-vs-publishable-key) it replaces, the publishable key gives every visitor the `anon` role. Your database policies are what stand between a stranger and your rows.\n\n| Layer | What Lovable generates | Where it leaks | \n|---|---|---|\n| Browser bundle | A Supabase client with the URL and publishable key, and calls that name your tables | A secret key pasted into a `VITE_` variable or a component reaches every visitor's browser | \n| Database | Tables and policies, written as SQL migrations | A table without RLS, a policy whose condition is `true` , or a policy for signed-in users that never compares the row's owner to`auth.uid()` | \n| Database functions | RPC functions for admin checks, counters, search | A function marked `security definer` that anyone can call, or an access check written backwards | \n| Edge functions | AI chat, emails, Stripe payments and webhooks | No check on the caller: strangers spend your AI credits or send email in your name; webhooks accepted without a signature check | \n| Server code (TanStack Start apps) | Server rendering and server logic | Code that uses an admin client skips RLS, so it must check ownership itself | \n| Storage | Buckets for avatars and uploads | A public bucket holding private files, or policies that let any user read every folder | \n| Sign-up | Sign-up and sign-in pages | Open sign-up plus policies that only check that the caller is signed in: any stranger gets in after creating an account | \n\n## What Lovable's security scan catches, and what it does not\n\nLovable ships a real set of security tools, and it deserves credit for them. Here is what its documentation describes as of November 2026.\n\n| Tool | When it runs | What it checks | \n|---|---|---|\n| **Quick scan** | Automatically when you publish (it starts when the publish dialog opens), and on demand | Database rules (tables without RLS, rules that let everyone through, leaked-password protection turned off, storage rules), known vulnerabilities in npm dependencies (only critical ones become findings), and MCP servers exposed without authentication. It does not read your application code. | \n| **Deep scan** | Only when you start it, from the Security view, the workspace Security center or the chat. Scheduled runs are Enterprise only | Everything in the Quick scan, plus your code: access control (including server code that bypasses database rules), unauthenticated endpoints, injection, leaked secrets, payments, authentication, exposed personal data | \n| **Security review in chat** | When you ask for one | An AI review of your code (XSS, input handling, sign-in flaws) and your RLS policies. It also starts a free Deep scan; the chat itself uses credits | \n| **Secret detection** | When you paste a key into the chat | Guides you to store the key in Secrets instead of in code, and offers a connector when it recognises the service | \n| **Aikido pentest** (optional) | On a project, once the workspace connects Aikido | Dynamic tests: AI agents send real payloads to your running app. Billed by Aikido | \n| **Block publishing with critical issues** | Workspace setting | Stops publishing while critical findings are open. On by default in new Enterprise workspaces | \n\nTwo limits matter. First, Lovable states that its built-in scanners are **static analysis**: they read code and configuration and flag patterns that look risky. They do not send requests to your live app to see what comes back. Second, a scan only reports. In the February 2026 case below, Lovable said a scan had been offered before publishing and its recommendations were not applied. Its own docs add that these tools cannot guarantee complete security, and suggest a professional review for apps with sensitive data.\n\n## Lovable security issues: four public cases\n\n### CVE-2025-48757: missing RLS in 170 apps\n\nIn March 2025, researchers scanned the home pages of 1,645 apps listed on Lovable Launched, Lovable's showcase, and found 303 endpoints across 170 projects, about 10.3%, with inadequate RLS. Their [write-up](https://mattpalmer.io/posts/statement-on-CVE-2025-48757/) lists names, phone numbers, subscriptions, payment details and API keys among the exposed data, and notes that pages behind a login were not checked. NVD lists the CVE with a CVSS score of 9.3, assigned by MITRE, and records that Lovable disputes it because each customer is responsible for protecting their own app's data.\n\n### February 2026: one showcased app, 16 flaws\n\nThe Register reported that a researcher found 16 vulnerabilities, six of them critical, in a single app hosted on Lovable and featured on its Discover page, exposing 18,697 user records, many of them teachers and students. One of the main bugs was an access check in a database function written backwards: it blocked signed-in users and let anonymous visitors through. Lovable answered that its scan before publishing had made recommendations that were not applied, that the project included code not generated by Lovable, and that the vulnerable database was not hosted by Lovable. A check that RLS is on does not see a logic bug like this one; a code review or one request from outside does.\n\n### April 2026: public projects' chats and code\n\nThe Register also reported a researcher's claim that any free account could read other users' chat history and source code on public projects, including database credentials found in that code. Lovable first said it had not suffered a data breach, and that the code of public projects is visible by design. It then explained that projects have been private by default on every plan since December 2025, and that a February 2026 change to its permission system had accidentally re-enabled access to chats on public projects, which it reverted.\n\n### November 2026: 159,041 projects examined\n\nThe Hamburg security firm Crissy Field identified 159,041 Lovable projects in Common Crawl data from December 2025 to September 2026. Of the 34,545 that used Supabase, 24,664 websites sent database records to the browser as soon as they loaded, and records containing email addresses turned up in 10,560 tables across 7,403 of those websites. The [report](https://crissyfield.de/research/lovable-en/) says this 30% should not be read as a confirmed leak rate, names no app, and describes cases such as a forum with more than 80,000 profiles and 200,000 chat messages, and more than 1,000 records with passport numbers. [What the scan found, figure by figure](https://keybrum.com/guides/vibe-coding-security-statistics) covers it and the checks to run on your own app.\n\n## How to check your Lovable app\n\nSix checks, from the cheapest to the most telling. The first four happen inside Lovable and change nothing.\n\n1. 1Run both scans Open the project's Security view and run the **Deep scan** , not only the Quick scan you get on publish. Read every finding, including the ones marked ignored, and note which tables and functions they name.\n2. 2Read your policies Go to **More → Database → Manage → Policies** . The view is read-only. Look for policies that apply to`anon` , rules with no condition, and policies for`authenticated` whose expression never mentions`auth.uid()` . Each of those lets in more people than you probably meant.\n3. 3Query the database Open **More → Database → Manage → SQL editor** and run the queries below. They read the system catalog of your own project and change nothing.\n4. 4Search the code for secret keys In the code editor or your synced Git repository, search for `sk_live_` ,`sk-` ,`service_role` ,`sb_secret_` and`PRIVATE KEY` . The`.env` file should hold only public values such as`VITE_SUPABASE_URL` and`VITE_SUPABASE_PUBLISHABLE_KEY` . A Supabase key written as a JWT (a long string starting with`eyJ` ) hides its role, so paste it into the[Supabase key checker](https://keybrum.com/tools/supabase-key-checker) ; the[API key leak checker](https://keybrum.com/tools/api-key-leak-checker) recognises other common key formats.\n5. 5Use the app as a stranger Open the published app in a private window, signed out, and try every page and form. Then sign up with a second account and try to open the first account's records, for example by changing an id in the address bar. If you see someone else's data, you have an [IDOR](https://keybrum.com/guides/idor-broken-access-control) .\n6. 6Check visibility and members Confirm the project is private, and remove workspace members who no longer need access.\n\n## Fixes, with prompts for Lovable\n\nLovable changes policies and functions through its chat, so the fastest fix is a precise prompt. Paste one at a time, then reopen the policies view to confirm what changed.\n\n### Lock every table\n\nCompare what it wrote with the pattern below. The first two policies are the ones scans and attacks turn up most; the third is the fix.\n\nThe [Supabase RLS guide](https://keybrum.com/guides/supabase-rls) has policies for teams, shared records and public read with owner write. The [RLS checker](https://keybrum.com/tools/supabase-rls-checker) reviews the policies you paste, in your browser.\n\n### Protect edge functions\n\nAn AI function that answers anyone runs up a bill you pay. See unprotected AI endpoints. For payments, ask Lovable to verify the `Stripe-Signature` header with the webhook signing secret before handling any event, as covered in Stripe webhook security.\n\n### Move secrets to the server\n\nRotate at the provider, not only in Lovable: a key that shipped in a build has already been copied. [Leaked API key: what to do](https://keybrum.com/guides/api-key-exposed-in-frontend) gives the order of operations.\n\n### Check server code and storage\n\nThe service role key skips RLS by design, so any code holding it has to do the checking itself. The [service role key guide](https://keybrum.com/guides/supabase-service-role-key) explains when it belongs on a server and when finding it is a breach. For buckets, see [Supabase storage security](https://keybrum.com/guides/supabase-security).\n\n## The traps after the first fix\n\n- **The Deep scan is a snapshot.** It does not run as you work, and the Quick scan never reads code. A feature added after your last Deep scan has not been reviewed, so run it again before each publish that adds data or functions.\n- **New features rewrite policies.** When a prompt asks for something the current policies block, loosening a policy is a common shortcut for any coding agent. Reopen the policies view after each feature that touches data.\n- **`.env` is committed on purpose.** Lovable needs`.env` in the repository so builds get their`VITE_` values. Anything you put there is in your Git history, and every`VITE_` value your code uses ends up in the browser bundle.\n- **Your own Supabase project is your job.** If you connected Supabase instead of the built-in backend, Lovable's password rotation does not cover it, and its keys and settings are yours to manage. The[Supabase security guide](https://keybrum.com/guides/supabase-security) covers that side.\n- **Only critical dependency flaws become findings.** High-severity ones do not, and some critical ones are held back when Lovable judges them unable to affect its apps or unlikely to be exploited (they stay in the project's dependency list with a marker). Run`npm audit` on a synced copy from time to time.\n- **Auto-fix has limits.** It picks up a few critical database and dependency findings from the Quick scan during your build requests, uses credits, and never fixes Deep scan findings. Fix those from the Security view or the chat, then reopen the policies view.\n\n## Test the published app, not only the code\n\nScans read what you wrote. An attack shows what your published app answers, which is exactly what a stranger gets. Lovable's own docs draw the same line and offer Aikido's pentests as an option. Keybrum runs this kind of test against the stack Lovable generates. It:\n\n- reads, inserts and updates rows in every table it finds, as `anon` and as a freshly signed-up account;\n- calls your RPC functions, lists and uploads to storage buckets, and subscribes to realtime channels;\n- sends a short test prompt to edge functions that look like AI endpoints, to see whether a model answers without an account;\n- looks for secret keys in your bundle and in table rows anyone can read;\n- tries to open one account's records from a second account, and sends unsigned Stripe webhook events.\n\nEach finding comes with the request that worked and the fix. A coding agent such as Cursor or Claude Code reads them through Keybrum's MCP server, or you paste the fix into Lovable's chat. Keybrum only attacks apps whose owner proved ownership, and on a plan it attacks again on every deploy, so a policy loosened next week shows up next week.\n\n## Lovable security checklist\n\n- The project is private, and keys from any period when it was public have been rotated\n- The Deep scan ran after the last feature that touched data, and every finding is fixed or explained\n- Every table in `public` has RLS on, and no policy uses the condition`true` unless the data is meant to be public\n- Policies for `authenticated` compare the row's owner to`auth.uid()`\n- Functions that run as their owner cannot be called by `anon` , unless that is intended\n- Buckets with private files are private, with per-user folder policies\n- `.env` holds only public values; secret keys live in Secrets and were rotated if they ever shipped\n- Edge functions that call AI, send email or change data require a signed-in user and have a rate limit\n- Stripe webhooks verify the signature\n- Leaked-password protection is on (built-in backend: **More → Users → Settings → Email** , Password HIBP check)\n- A second test account cannot see the first account's data\n- The published app was tested from outside after the last deploy\n\nThe [vibe coding security checklist](https://keybrum.com/guides/vibe-coding-security-checklist) extends this list to other AI builders, and [vibe coding security risks](https://keybrum.com/guides/vibe-coding-security-checklist) explains why the same bugs keep coming back.\n\n## Questions\n\n## ### Is Lovable safe to use?\n\nAs a platform, yes for most uses: it hosts your app, manages the database, scans each publish and holds SOC 2 Type II and ISO 27001:2022 certifications. Your app's safety depends on its RLS policies, where its keys live and whether its functions check the caller, and Lovable's docs make that your responsibility. Run the Deep scan and test the published app before real users arrive.\n\n## ### Is Lovable AI safe for my private data?\n\nLovable says projects have been private by default on every plan since December 2025. When a feature needs an API key, enter it through the secure input Lovable shows, so it is stored as an encrypted secret that never reaches the browser. If a project was ever public, rotate any key that appeared in its chat or code.\n\n## ### Has Lovable had a security breach?\n\nLovable says it has not suffered a data breach. In April 2026 The Register reported that any account could read the chats and code of public projects: Lovable said public code is visible by design, and that a February 2026 backend change had wrongly re-enabled access to public project chats, which it reverted. Separately, CVE-2025-48757 covers apps built on Lovable with missing RLS, a CVE Lovable disputes.\n\n## ### What does the Lovable security scan check?\n\nThe Quick scan runs on every publish and checks database rules, critical npm vulnerabilities and MCP servers exposed without authentication, without reading your code. The Deep scan adds a code review for access control, unauthenticated endpoints, injection, leaked secrets and exposed personal data, but only runs when you start it. Both are static analysis.\n\n## ### Is the Supabase key in my Lovable app's code a leak?\n\nNot if it is the publishable key in `VITE_SUPABASE_PUBLISHABLE_KEY`: Lovable's docs say it is safe to be public, and every visitor's browser has it. It gives the `anon` role, so your RLS policies decide what it reaches. A key starting with `sb_secret_`, or a JWT key whose role is `service_role`, in frontend code is a real leak.\n\n## ### Do I still need a pentest if I use Lovable's scans?\n\nThe built-in scans read your code; they do not send requests to the running app. For an app with user data or payments, test it from outside: Lovable offers Aikido as an option, and Keybrum attacks the published app and retests on every deploy. The [free check](https://keybrum.com/check) is a quick first look at what a stranger sees.\n\n## ### Can Lovable fix security issues for me?\n\nPartly. In the Security view, Try to fix all draws on 10 free fixes per account, each available again 24 hours after use; past that, fixes use credits. Auto-fix, which adds a few critical Quick scan findings to your build requests, uses credits and does not handle Deep scan findings. Reopen the policies view after any fix to see what changed.\n\n## Sources\n\n1. 1.[Security overview](https://docs.lovable.dev/features/security) , Lovable Documentation\n2. 2.[Built-in backend](https://docs.lovable.dev/features/cloud) , Lovable Documentation\n3. 3.[Secrets](https://docs.lovable.dev/features/secrets) , Lovable Documentation\n4. 4.[Control who can access your app's data](https://docs.lovable.dev/features/database-access) , Lovable Documentation\n5. 5.[Database (SQL editor)](https://docs.lovable.dev/features/database) , Lovable Documentation\n6. 6.[Edge functions](https://docs.lovable.dev/features/edge-functions) , Lovable Documentation\n7. 7.[FAQ: tech stack and compliance](https://docs.lovable.dev/introduction/faq) , Lovable Documentation\n8. 8.[CVE-2025-48757](https://nvd.nist.gov/vuln/detail/CVE-2025-48757) , NIST National Vulnerability Database\n9. 9.[Statement on CVE-2025-48757](https://mattpalmer.io/posts/statement-on-CVE-2025-48757/) , Matt Palmer\n10. 10.[Lovable-hosted app littered with basic flaws exposed 18K users, researcher claims](https://www.theregister.com/2026/02/27/lovable_app_vulnerabilities/) , The Register\n11. 11.[Vibe coding upstart Lovable denies data leak, cites 'intentional behavior,' then throws HackerOne under the bus](https://www.theregister.com/2026/04/20/lovable_denies_data_leak/) , The Register\n12. 12.[Lovable: research on 159,041 projects](https://crissyfield.de/research/lovable-en/) , Crissy Field", "url": "https://wpnews.pro/news/lovable-security-is-lovable-safe-and-what-your-app-still-needs", "canonical_source": "https://keybrum.com/guides/lovable-security", "published_at": "2026-11-10 08:00:00+00:00", "updated_at": "2026-11-27 17:12:30.415323+00:00", "lang": "en", "topics": ["ai-safety", "ai-tools", "ai-products"], "entities": ["Lovable", "TanStack Start", "Supabase", "PostgreSQL", "CVE-2025-48757", "Wiz", "Aikido"], "also_reported_by": [], "takeaway": "Lovable's browser-side database access means every table needs RLS policies, since 170 of 1,645 scanned apps had missing or weak RLS, and server code using an admin key bypasses RLS entirely and must check ownership itself.", "recommendation": {"advice": "Enable RLS on every table and test the published app signed out and with a second account, since Lovable's Quick and Deep scans are static and miss what a stranger can actually read.", "playbook": "agent-security", "playbook_url": "https://wpnews.pro/playbooks/agent-security"}, "alternates": {"html": "https://wpnews.pro/news/lovable-security-is-lovable-safe-and-what-your-app-still-needs", "markdown": "https://wpnews.pro/news/lovable-security-is-lovable-safe-and-what-your-app-still-needs.md", "text": "https://wpnews.pro/news/lovable-security-is-lovable-safe-and-what-your-app-still-needs.txt", "jsonld": "https://wpnews.pro/news/lovable-security-is-lovable-safe-and-what-your-app-still-needs.jsonld"}}