Skip to content
BuildThenTestedSee packages

Lovable app security: defaults, what breaks, what to check

Lovable is an AI app builder that generates a full-stack web app from a chat prompt, with a built-in backend called Lovable Cloud. Below: what it configures by default according to its own documentation (verified 2026-09-21), the 15 patterns most associated with it, the security features the vendor offers and where they stop, and a checklist you can run without buying anything.

Lovable's docs state that the security scanners help identify common issues and that users should review RLS policies early. Defaults change with the product; every row above reflects the page on the verified date.

Lovable turns a chat prompt into a working web app with a backend it calls Cloud, built on Supabase's open-source foundation. That means most Lovable apps carry a Postgres database, Supabase Auth, edge functions for server code, and a public app URL, whether or not the builder ever mentioned those words.

Testing a Lovable app is mostly testing that stack. Which tables have row-level rules, what the browser can reach with the public key, whether permission checks run on the server, and what the published URL exposes. Lovable's own Basic scan runs before publish and its Deep scan covers more. What follows is what to check beyond them.

What Lovable sets up by default

Each row is taken from the vendor's documentation on the date shown. Defaults change; the date is the claim.

Defaults of Lovable as documented by the vendor
AreaDefaultSource
FrontendNew projects use the TanStack Start template (default since May 13, 2026; June 22, 2026 for Enterprise). Older projects were built on React + Vite.docs · verified 2026-09-21
Backend / databaseThe built-in backend (Cloud) is enabled by default for the workspace and uses Supabase's open-source foundation; every Cloud project includes a managed Postgres database.docs · verified 2026-09-21
AuthWith a connected Supabase project, login flows use Supabase Auth; social providers must first be enabled in the Supabase dashboard.docs · verified 2026-09-21
HostingApps publish to [subdomain].lovable.app by default. On Free and Pro plans anyone with the link can visit the published app; custom domains need a paid plan.docs · verified 2026-09-21
Secrets / env varsSecrets are stored in the backend (Cloud secrets or the Supabase project's edge function secrets) and read by edge functions; the docs state they do not appear in app code or the repository.docs · verified 2026-09-21
Source accessGitHub two-way sync; repositories created by Lovable are private by default on every plan. Full codebase download is a paid-plan feature; the Free plan editor is read-only.docs · verified 2026-09-21
Database access rulesLovable sets up RLS policies automatically when it builds features that store user data. The RLS policies view under Cloud > Database is read-only; changes go through chat.docs · verified 2026-09-21
Payments integrationStripe secret key is stored as a backend secret STRIPE_SECRET_KEY and called from edge functions. By default the integration runs without webhooks and queries Stripe for payment status; webhooks are added on request.docs · verified 2026-09-21

Documentation home: docs.lovable.dev/

What breaks in Lovable apps

42 patterns in the catalogue name Lovable; the most severe are listed here across secrets and keys, data access, login and permissions, payments, ai features. Attribution is descriptive: the default stack makes the pattern reachable, or a public incident names it.

  • NEXT_PUBLIC_ prefix on a secretSecrets and keys

    The build writes the secret's value into public JavaScript, so anyone who loads the site can read it, and a redeploy with the same variable name republishes it.

    Critical
  • Secrets committed to the code repositorySecrets and keys

    Everyone who can see the repository, now or later, holds working keys to the database, payment account and model provider, and the keys stay in history after the file is deleted.

    Critical
  • Service-role key shipped in the browser bundleSecrets and keys

    Anyone who opens the app can copy the key from the downloaded JavaScript and read, change or delete every row in every table.

    Critical
  • Inverted policy logicData access

    Signed-out visitors or other customers can read rows meant for one account, while the owner sees an empty page and nobody notices.

    Critical
  • Any signed-in user can read every rowData access

    Anyone who creates a free account can page through every other customer's records, which is a data breach with a sign-up form as the only step.

    Critical
  • Row Level Security disabled on a tableData access

    Anyone with the project URL and the public anon key, both of which sit in the app's JavaScript, can read, edit or delete every row in the table.

    Critical
  • RLS policy that allows everything with using (true)Data access

    The table looks protected in the dashboard, yet any visitor with the public anon key can read, insert, update and delete every row.

    Critical
  • Admin routes without any login checkLogin and permissions

    A stranger who types /admin or /api/admin into the address bar can see or change everything the owner can.

    Critical
  • Authorization enforced only in the browserLogin and permissions

    Anyone who calls the API directly, or edits the page in developer tools, gets the data and actions the screen was hiding.

    Critical
  • Tokens trusted without server verificationLogin and permissions

    Anyone can write their own token naming another user, or an admin, and the server will act as that person.

    Critical
  • Role chosen by the client at signupLogin and permissions

    A visitor who edits the signup request, or updates their own profile, can make themselves an admin.

    Critical
  • Stripe webhook accepted without signature verificationPayments

    Anyone who finds the webhook URL can post a made-up payment-succeeded event and get an order fulfilled or a plan activated for a user of their choosing, without paying.

    Critical
  • LLM API key exposed to the clientAI features

    Anyone who views the page source can copy the key and run their own workloads on your account until the bill or the provider stops them.

    Critical
  • No output validation before actionsAI features

    Whoever can influence the model's input can delete tables, email your whole customer list, or trigger any other action the app has wired up.

    Critical
  • Third-party API key in the JavaScript bundleSecrets and keys

    Anyone who views the page source can take the key and run up charges, send messages or pull data on your account until the key is revoked.

    High

Public incidents

A scan of 1,645 Lovable-built apps found 170 (about 10.3%) with database endpoints readable without login because Supabase row-level security policies were missing or too broad; recorded as CVE-2025-48757, CVSS 9.3.

  • 1,645 Apps scanned
  • 170 Apps with inadequate RLS
  • 10.3% Share of scanned apps
  • 303 Exposed endpoints
  • 9.3 Critical CVSS 3.1 base score (CVE record)
  • 8.26 Researcher's own CVSS base score
  • 2025-03-21 Scan date
  • 2025-05-29 Public disclosure

May 2025 · Matt Palmer (Replit, Inc.) · all sources

One education app built on Lovable had 16 vulnerabilities, 6 critical; a database function denied callers whose role was 'authenticated', so anonymous callers passed and 18,697 user records were readable without login.

  • 16 Vulnerabilities found
  • 6 Critical
  • 18,697 User records exposed
  • 14,928 Unique email addresses
  • 870 Enterprise users with full PII

Feb 2026 · Taimur Khan · all sources

Lovable reported that from 3 February to 20 April 2026 a backend regression let any logged-in Lovable user read the chat history and source code of public projects; a fix shipped within two hours.

  • 2026-02-03 to 2026-04-20 Exposure window
  • 2026-02-22 First HackerOne report
  • about 2 hours Time from public report to fix

Apr 2026 · Lovable · all sources

Moltbook, a social network for AI agents built with AI-generated code, ran a Supabase database without row-level security policies, leaving 1.5 million API tokens and 35,000 email addresses readable and writable without login.

  • 1.5 million API authentication tokens exposed
  • 35,000 Email addresses exposed
  • about 17,000 Human account owners in database
  • 2026-01-31 Reported to maintainer
  • 2026-01-31 (within about 2 hours) First fix applied

Feb 2026 · Wiz Research · all sources

Each entry links to its primary source in the evidence list. What to do about it is the self-check below.

Lovable's own security features, and where they stop

Stated from the vendor's documentation. The limits are the vendor's scope statements, not judgements.

  • Security scan (Basic)

    Runs automatically before publishing: RLS policy linting, database schema review, and an npm dependency audit that re-runs when dependency files change.

    Where it stops: Basic scan does not include access-control review, endpoint protection checks or code-level checks; those are in Deep scan, which runs on demand.

    vendor docs · verified 2026-09-21

  • Security scan (Deep)

    Adds access-control review, backend endpoint protection checks, code-level checks (exposed secrets, unsafe input handling, insecure storage settings, information leakage) and project-specific issues from security memory.

    Where it stops: Does not run automatically as you work; the docs state the tools identify common issues and do not claim complete coverage.

    vendor docs · verified 2026-09-21

  • Backend secrets

    API keys are entered once, stored server-side and used only from edge functions; the value is not shown again and does not appear in code or the repo.

    Where it stops: Only covers values you store as secrets; anything written into frontend code is visible to users, per the security best-practices page.

    vendor docs · verified 2026-09-21

  • Private repositories

    GitHub repositories created by Lovable start private on every plan.

    Where it stops: Visibility of the published app is a separate setting; on Free and Pro anyone with the link can open the published app.

    vendor docs · verified 2026-09-21

Check it yourself, in this order

The critical patterns first. Each uses the dashboard and your browser.

NEXT_PUBLIC_ prefix on a secret

  1. In your hosting dashboard (Vercel: Project, Settings, Environment Variables) or your .env files, list every variable whose name starts with NEXT_PUBLIC_.
  2. For each one, ask whether the provider calls that value secret, private, server or admin. Stripe secret keys, model provider keys, database passwords and Supabase service_role keys all fall in that group.
  3. Open the live site in Chrome, right-click, choose Inspect, open the Sources tab and press Ctrl+Shift+F. Search for the first few characters of each suspect value.
  4. A bad result is a NEXT_PUBLIC_ variable holding a server-only key, or a search hit for that key's value in a loaded script.

Secrets committed to the code repository

  1. Open your project on GitHub (or the code view in your builder) and look at the file list for .env, .env.local, .env.production, serviceAccountKey.json or firebase-adminsdk files.
  2. Use the repository search box and search for sk_live, sk-, service_role, BEGIN PRIVATE KEY and password=.
  3. If you have the code on your computer, run one command in the project folder: git log --all -p -S sk_live -- . | head. Any output means a live key has been committed at some point.
  4. On GitHub, open Settings, then Code security, and check whether Secret scanning shows alerts.
  5. A bad result is any env or key file in the file list, any search hit that shows a real key, or an open secret scanning alert.

Service-role key shipped in the browser bundle

  1. Open your live app in Chrome, right-click anywhere and choose Inspect, then open the Sources tab.
  2. Press Ctrl+Shift+F (Cmd+Option+F on a Mac) to search every loaded file. Search for service_role and then for sb_secret_.
  3. Open the Network tab, reload the page, click any request whose address contains supabase.co, and read the apikey header under Request Headers.
  4. In the Supabase dashboard, open Project Settings, then API Keys, and compare that header value with your keys.
  5. A bad result is any search hit, or a header value that matches the service_role or secret key rather than the anon or publishable key.

Lovable pre-launch checklist

42 checks, in the order we run them. Usable without buying anything.

Self-check tool

Answer questions about your app and get the patterns that apply, ordered by severity. Runs in your browser; nothing is sent.

Run the self-check

Packages for Lovable apps

Pre-launch check

Start here

For founders about to let real users in.

$490

Report in 48 hours
  • Keys and secrets in the browser or repo
  • Who can read and change whose data
  • Login, roles and admin routes
  • Errors, retries and rate limits
  • Debug mode, headers, deploy path

What you receive

Security sweep

For anyone who wants the three riskiest areas checked fast.

$290

Report in 24 hours
  • API keys and secrets in the bundle
  • Row-level rules on every table
  • Cross-user data reads
  • Admin and hidden routes
  • Client-only permission checks

What you receive

All packages and prices. Every report includes a re-check after your fixes.

Questions about Lovable

lovable app security audit

An audit of a Lovable app checks four things. The Supabase tables behind it for row-level rules. The JavaScript sent to the browser for keys. Every edge function for its own permission check. The published URL for what a stranger can reach. Our security sweep does this in 24 hours; the pre-launch check adds reliability and deploy settings.

does lovable security scan cover everything

Lovable's docs describe the Basic scan as RLS linting, schema review and a dependency check before publish, and the Deep scan as adding access-control and code-level checks. The docs also say the scanners help identify common issues. A scan is a good first pass; an independent test with a second account and script-driven probing finds what the linter cannot, such as logic that is technically valid but wrong for your app.

is my lovable app safe to launch

Run the self-check for Supabase on this site first: table rules, keys in the bundle, permission checks on edge functions. If every answer is a confident no, you are in good shape; if any answer is unsure, the security sweep or pre-launch check will settle it before your first users arrive.