Lovable security, as Lovable’s own security page lists it, covers the platform: a firewall, encrypted secrets, rate limits and a scan at every publish. Whether a signed-in stranger can read another customer’s rows, find a private key in the browser or run up your AI bill is decided in your app, by four controls you set and test.

What Lovable secures, and the four controls your app still needs

Platform protection on Lovable means firewall controls, network isolation, encrypted storage and secrets, rate limiting, and a scan at every publish. The app’s own access rules, private keys, endpoint limits and AI spend stay with the builder, and four controls cover them.

In Lovable’s words, Lovable Cloud is protected by “web application firewall (WAF) controls, network isolation, encrypted data storage, and adaptive rate limiting at the IP, user, and workspace level”, and secrets “are not exposed in plaintext in logs or interfaces”. The same page says workspace admins can let the agent auto-fix non-breaking findings and can block publishing on critical ones. Those are controls on Lovable’s side of the line, and whether Lovable itself is safe as a platform is its own question, with its own history.

Lovable’s security page is the platform’s account of itself, and Lovable’s trust center lists SOC 2 Type II, SOC 2 Type I, ISO 27001:2022, AIUC-1 and GDPR. Its October 2026 update says Lovable completed a SOC 2 Type II audit covering February 1 to August 1, 2026, with the report available on request. Those cover the company that runs the builder, and what Lovable’s compliance documents cover for your own customers is a separate read.

The app is a different matter. Lovable’s security docs put it plainly: “You are responsible for ensuring that your app meets the security requirements appropriate for its use case, especially if it handles sensitive data or performs critical functions.” Lovable apps enforce data access through Supabase row level security policies, and every policy in a project can be reviewed under More → Cloud → Database → RLS policies. The four controls below are where that responsibility lands.

ControlDeliverableWhat it isWhy it mattersWhere it lives in a Lovable app
Owner-checking access rules1.4 Data isolation across every tableRow-Level Security or equivalent server-side scoping across all tables, with explicit rules for intentionally public dataMissing data boundaries can expose one customer’s records to anotherThe RLS policies view: More → Cloud → Database → RLS policies
No private keys in the browser2.1 Frontend secret removalAll private secrets out of frontend code and downloadable bundles, with their use moved to server-side codeExposed private credentials can let others access services using your permissionsCloud Secrets, read only in Edge Functions or other server-side code
Signed-in, limited functions3.6 Public-endpoint rate limitsPublic forms, signup flows and resource-consuming endpoints protected with appropriate limitsAbuse can create spam, availability problems, and unexpected service billsEdge Functions, under More → Cloud → Edge functions
A spend ceiling and alert2.7 Metered-service spend alertsSpend or usage alerts for every metered API, using provider alerts or application-side measurementUnexpected consumption can continue unnoticed until the next invoiceThe AI provider’s console for your own key; Workspace settings → Usage limits & alerts for Lovable’s AI gateway

These four are deliverables 1.4, 2.1, 3.6 and 2.7, four of the 123 in the Production Hardening Sprint.

Lovable security issues: what goes wrong without each control

The security risks associated with Lovable apps that the platform leaves to you sit in four places: policies that check a login instead of an owner, a private key in the browser bundle, an Edge Function anyone can call without a limit, and an AI feature with no spend ceiling.

Every count in this section comes from 21 third-party apps we audited in June and July 2026. They were chosen, not drawn at random, and they were not all Lovable builds: one app’s profile records a v0-origin build. So the counts show the shapes these failures take, never a failure rate for Lovable apps.

IssueWhat a stranger can reachFirst check
A policy that checks a login, not an ownerEvery row of that table, from any signed-in accountAsk for another account’s row while signed in as a second account
A private key in the browser bundleWhatever the key unlocks, with your permissionsSearch the published JavaScript for secret-key patterns
An Edge Function with no caller check or limitThe function’s work, as often as they likeCall the function logged out, then send a short burst
An AI feature with no spend ceilingYour AI or compute billLower the alert threshold and see who hears about it

RLS that checks a login, not an owner, and views that skip it

A policy whose test is auth.uid() is not null, or simply true, lets every signed-in account through to every row it covers. RLS shows as enabled, a policy exists, and the data is still shared across customers. The test that finds it uses a second account that asks for the first account’s rows. In the same audits, 7 of the 21 apps had confirmed cross-user or cross-tenant authorization failures, where a logged-in user could read or write another customer’s data.

Views add a second gap. In two apps we audited, views that skipped row-level security had been created without security_invoker, and in a B2B starter every signed-in user could read every tenant’s join requests. Supabase’s RLS guide explains why: views “are usually created with the postgres user”, and Postgres “automatically creates views with security definer”, so a view can bypass the caller’s RLS; in Postgres 15 and above, security_invoker = true makes it obey the policies of its tables.

A private key in the browser bundle

Supabase’s publishable key is made for the browser: Supabase calls it “Safe to expose online”. A secret or service_role key is the opposite. Those keys “provide full access to your project’s data, bypassing Row Level Security”, and Supabase lists “a browser, even on localhost” as a place a secret key must never appear. The same holds for an AI provider’s key, and Lovable’s docs say API keys “cannot be stored safely in client-side code”.

Across the 21 apps, 6 shipped a real secret. A key in the published JavaScript is readable by anyone who opens the app, and Lovable’s own advice is that such secrets “should be considered compromised”. Deleting the line does not end it either: three of the audited apps had a real secret left permanently in git history, a webhook signing secret, a live AI-provider key, and a Stripe test key with its webhook secret.

An Edge Function anyone can call, with no limit

In Lovable Cloud, server work runs in Edge Functions, or in TanStack Start server functions or API routes, depending on the project, and the built-in backend includes “a database, storage, authentication, realtime, and functions”. Lovable’s best practices warn that “A function running on the server is still callable by a client, so server-side execution alone does not make the operation private.” A function that sends email, writes records or calls a paid model and never checks the caller will do that work for anyone who has its URL.

The same shape turned up in our audits: 11 of the 21 apps had unauthenticated endpoints doing privileged work, and 13 of the 21 had no rate limiting on their most expensive endpoint. Lovable Cloud’s own adaptive rate limiting works “at the IP, user, and workspace level”. Whether that limit reaches one of your own functions, per signed-in user of your app, is not stated in Lovable’s docs.

An AI feature with no spend ceiling

Of the 14 AI apps we audited in June and July 2026, 12 had a confirmed denial-of-wallet path, where a stranger or free account can burn the owner’s paid AI or compute bill without limit; the 14 are the third-party apps with an AI or LLM surface, a chosen group rather than a random sample.

In Lovable, AI features built on Lovable’s own AI run through the AI gateway, whose usage “is measured when AI features inside your deployed app make model calls” and, on Free, Pro and Business plans, draws from the monthly AI grant first, then from general credits if available. An app that calls a provider with its own key bills that provider account instead. The Lovable case has a second edge. When the credits run out, AI features in deployed apps “fail with an error”, and Lovable pauses the app’s backend services, “such as the database, storage, and authentication”, once the Cloud grant and general credits are both gone; the published pages keep serving, but the parts that need the backend stop responding. A spend problem can take the live app’s data offline, so the alert matters as much as the ceiling.

If the app already holds customers’ data and a launch, a customer’s security questions or an investor’s review is close, bring it to a free audit: we talk through with you where each of the four controls stands in your app and what that launch or review will ask of it. In the sprint, our engineers implement and test Row-Level Security across all tables, remove private secrets from frontend code and downloadable bundles, protect public forms, signup flows and resource-consuming endpoints with appropriate limits, and configure spend or usage alerts for every metered API; the implementation follows your stack, and the targeted security tests are performed by AxonBuild.

How to set them up in a Lovable app

The prompts below are ours; every setting, path and code form comes from Lovable’s, Supabase’s, PostgreSQL’s and OpenAI’s docs, and none was run for this page. Each part gives the prompt to paste into Lovable’s chat first, then the manual path.

Rewrite each policy to compare the row with its owner

List every table, whether RLS is enabled on it, and each SELECT and UPDATE policy.
Flag every policy that only checks for a session (auth.uid() is not null, or true).
List every view and say whether it runs with security_invoker = true.

On the manual path, open More → Cloud → Database → RLS policies and read each policy’s condition. An owner check compares the row’s owner column with the caller, in the form Supabase’s row-level security guide prints, and an existing view can be switched to run as its caller with ALTER VIEW ... SET, as the PostgreSQL manual gives it:

create policy "Owners read their orders" on public.orders
  for select to authenticated
  using ( (select auth.uid()) = user_id );

-- Postgres 15+: the view now applies the caller's RLS
alter view public.order_summary set (security_invoker = true);

The table and view names are placeholders. Rows that belong to a team or workspace need a membership check instead of a single owner column; owner and membership policies in Supabase covers both forms.

Move every private key into Cloud secrets and an Edge Function

List every API key and secret this project uses, where each one is read,
and flag any that ends up in the frontend bundle.
Move each flagged key into Secrets and read it only in server-side code.

Lovable’s security best practices say to store sensitive values in Secrets and to “Read secrets only in server-side code, and keep their values out of responses and logs.” Lovable secrets sit in the Cloud view (More → Cloud → Secrets), and Lovable also catches API keys pasted into the chat and steers them there. A key that already shipped is rotated at the provider, not only moved: it already counts as compromised, and a deleted line can leave the old value in git history. Which keys can live in the browser and which never leave the server depends on the key type, not the tool.

Require a signed-in caller on Edge Functions, and set a limit

List every Edge Function, whether it verifies the caller's session before any work,
and what per-user limit runs before each call to a paid service.
Add a session check that returns 401 to any function that has none.

Lovable’s best practices show the check: the function asks Supabase for the user and returns 401 Unauthorized when there is none, and they say every server function or API route “must check who is calling and whether they may perform the action”. On a Supabase project, Supabase’s Edge Functions auth docs set verify_jwt = true by default, so the platform validates the JWT before the handler runs, and turning it off “removes the platform’s check”. Whether Lovable Cloud exposes that setting is not stated in Lovable’s docs, so the check inside the function is the one to rely on.

The per-user limit belongs inside the function too, before the paid call, keyed to the signed-in user. Numbers to start with, and where a rate limit goes in a request’s path, have their own guide. A function left open so the prototype worked is one of the platform defaults that ship open.

Put a ceiling and an alert on every metered AI key

List every call to a paid AI or compute provider, which key it uses,
and what per-user budget runs before it. Add a daily per-user cap where none exists.

On the provider side, OpenAI’s platform docs describe spend alerts set on the limits page, which “send notifications when usage exceeds a certain dollar amount”, a hard spend limit that stops “affected API traffic when tracked spend reaches the limit”, and custom rate and spend limits per project. On the Lovable side, AI gateway usage shows under Workspace settings → Plans & credit usage → Usage details → Run credits. Lovable’s usage docs add Workspace settings → Usage limits & alerts, on all paid plans: a limit on a project’s AI credits can send an email or in-app notification, or block usage, and only workspace owners and admins can set one. Send the alert to the person who can top up the balance or switch the feature off. A hard cap written into the app’s own code, a monthly ceiling on a metered API, is the backstop when an alert arrives late.

What Lovable’s scan checks, and what it cannot see

Lovable’s built-in scan reads configuration and code: the Quick scan runs at every publish and checks RLS rules and database settings, and the Deep scan reviews the whole codebase on demand. Neither sends a second account’s request or a burst of traffic, so neither proves runtime behavior.

Lovable’s security page gives the timings: the basic scan checks “database configurations, RLS rules, cloud project settings, and known misconfiguration patterns in about 10-15 seconds”, and the deep scan “takes about 3 minutes”. Lovable’s security docs now call the basic one the Quick scan; it covers database access rules, a dependency audit and an MCP server check, and the Deep scan adds code areas such as access control and unauthenticated endpoints. Lovable also runs checks against the database configuration, including RLS coverage, and flags issues after schema changes.

Whether you can publish with open findings depends on the workspace’s publishing controls, where admins can block publishing while critical findings are unresolved. Running either scan is free, and fixes through Try to fix all draw on 10 free fixes per account, each available again 24 hours after use. The docs are direct about the limit: the built-in scanners “perform static analysis by reading your code and configuration”, and they “do not replace a thorough security review”. For runtime checks, the same docs describe AI penetration testing through an optional connector, where AI agents “interact with your running application, send real payloads” and try to exploit authentication, authorization and API flows.

Three things no static scan settles: whether a second account is refused when it asks for the first account’s row, whether a burst is stopped before the paid call, and whether the spend alert reaches a person. Lovable’s past record, from the April 2026 Lovable incident back to CVE-2025-48757, a disputed record of insufficient RLS policies in generated sites, is about the platform’s history, not about how your app answers those three.

How to verify each one: six requests you can run yourself

A Lovable security audit you can run yourself takes six requests: a second account asking for the first account’s row, a logged-out read and write, a look through the published files for keys, a logged-out Edge Function call, a short burst, and a test spend alert.

Run them against a test copy of the app or with test accounts you own, never against someone else’s app, and keep each response with its time and date.

  1. 01 Signed in as account B, request account A's row by its id through the app's API. Expect an empty result: a row the policy filters out is simply absent, with no error.
  2. 02 Logged out, read from and insert into each table with only the publishable key. Expect empty reads on private tables and refused writes.
  3. 03 Open the published app, then search the loaded JavaScript files in the browser's developer tools for sb_secret_ and your AI provider's key prefix. Expect no match, and expect any long key that starts with eyJ to be the project's anon key, never its legacy service_role key.
  4. 04 Logged out, call each Edge Function URL directly. Expect a 401 from every function that does privileged work.
  5. 05 From a low-limit test account, send a short burst to the most expensive function. Expect the function to refuse the extra requests before the provider is called.
  6. 06 Lower the spend alert's threshold below the current spend. Expect the alert to reach the owner who can act on it.

A request that succeeds where the list expects a refusal names the control to fix first. Testing Supabase RLS with two accounts takes check 1 into a full suite you can rerun after every schema change.

These six checks follow the way the sprint verifies the four deliverables. Deliverable 1.4 is verified this way: run read and write tests as anonymous users, different roles, and separate tenants. For 2.1, the verify line reads: scan source and built assets and inspect browser traffic for private credentials. The line for 3.6 is: simulate bursts and verify enforcement without blocking ordinary use. Under 2.7, it is: trigger a test threshold and confirm the alert reaches the designated owner.

All four sit inside the full authentication checklist for AI-built apps, next to sign-in, sessions and roles.

Who can help secure a Lovable app

Doing it yourself with the six checks fits an app with a few tables and an owner who can read a policy and follow a request in the browser’s network tab. Lovable’s own Deep scan, and its fixes, fit the findings a static read can surface. A freelancer fits one defined fix, such as rewriting the policies on a set of tables or moving one key behind a function. An agency fits when new features are being built at the same time as the security work. A fixed-scope service like ours fits when all four controls have to be set and tested, with evidence kept, before a launch or a customer’s review.

Common questions about securing a Lovable app

How do I add audit logs and secrets management to a Lovable app?

Put every private key in the project’s Secrets and read it only in server-side code such as an Edge Function, which is what Lovable’s best practices ask. Lovable’s workspace audit logs, under Workspace settings → Security → Audit logs, record workspace activity such as secrets changed, project auth settings updated and storage buckets created, can be exported as a JSONL file, and are available on Enterprise plans. An audit trail of what your own users do inside the app, such as role changes or deletions, is a table the app’s server code writes, and Lovable can be asked to add one.

How do I measure usage of my Lovable / Bolt app?

Lovable shows usage under Workspace settings → Plans & credit usage → Usage details, split into Build credits and Run credits, where Run covers Cloud, AI gateway and connector usage; a project’s More → Cloud → Usage view shows what drives that project’s Run credit usage. Bolt counts usage in tokens. A paid AI key you connected yourself reports its usage on the provider’s own dashboard, and how many people use the app is a job for the app’s analytics, not the builder’s meter.

How to enable leaked password protection in Lovable?

On Lovable Cloud, turn on Password HIBP check under More → Cloud → Users → Auth settings → Email; it checks each password against the HIBP database and rejects commonly leaked or easy-to-guess ones. On a connected Supabase project, leaked password protection sits in Supabase Auth’s password security settings; it uses the Pwned Passwords API and is available on the Pro Plan and above.

When should I get help with the security of a Lovable app?

Get help when real customers’ data is in a Lovable app and its access rules, private keys, function limits or AI spend alerts have no test you have run, or when Lovable’s scan findings are beyond what a prompt can fix. AxonBuild runs a free audit where we go over with you how your app handles those four controls before a launch, a customer review or an investor check.