Insights · Software17 November 2026 · 8 min read

What security holes do AI-built apps usually have?

AI-built apps share the same security holes: open tables, secrets in code, trust in the browser, personal accounts. How to find and close each one.

AI-built apps tend to have the same handful of security holes: database tables anyone can read, secrets written into the code or shipped to the browser, permission checks that live in the front end where they can be skipped, file uploads and inputs that are never checked, and integrations authorised through someone's personal account. None of these needs a sophisticated attacker. They are found by curious users, by automated scanners, and by the business itself when a customer asks why they can see someone else's invoice.

This article explains each hole, how to tell whether your app has it, and what closing it involves.

1. Database tables anyone can read

Most apps built with Lovable, Bolt or similar tools keep their data in Supabase or a comparable hosted database that the browser talks to directly. That design is fine when every table has row level security with policies that say who may read and write each row. It is dangerous when a table has no policies, because then the only thing between a customer and the whole table is the app's own interface, which is not a barrier at all.

Lovable's own guidance puts row level security on sensitive tables at the top of its pre-publish checklist, and notes that a table with row level security enabled but no policies returns nothing, which is the usual reason an app looks empty after someone tries to lock it down.

How to check: list every table that holds customer, staff or financial data. For each, ask whether row level security is on and whether the policies match who should see what. If any answer is "not sure", assume it is open.

How to close it: write the policies, test them with a non-admin account, and keep them as migrations in the repository so the next prompt cannot undo them.

2. Secrets in the code or in the browser

API keys for payment, email, maps and AI services end up pasted into source files or shipped to the browser as part of the front end. Anyone who views the page source can take them and spend on the business's account.

How to check: search the repository for anything that looks like a key. Open the live app, view the network requests and look for keys in the page or in request headers that should only exist on a server.

How to close it: move every secret to the published app's own configuration, with calls that need a secret made from a server function rather than the browser. Rotate every key that was ever exposed.

3. Permission checks in the wrong place

An AI-built admin page often hides buttons from non-admins and stops there. The request behind the button still works for anyone who sends it. Hiding is not the same as forbidding.

Lovable's security notes make a related point: server-side code that uses the service role key bypasses row level security altogether, so that code has to check permissions itself.

How to check: sign in as an ordinary user and try the admin actions directly, by editing the address or replaying the request. If they succeed, the check is only cosmetic.

How to close it: enforce every permission on the server or in the database, and treat the front end as a convenience.

4. Inputs and uploads that are trusted

Forms that accept anything, file uploads that accept any type and size, search boxes that pass text straight into a query. Each is a way in.

How to check: put unexpected things into every field. Very long text, scripts, a file with the wrong extension, a negative quantity, an identifier that belongs to another account.

How to close it: validate on the server, limit file types and sizes, store uploads out of the public path, and use the database client's parameter handling rather than building queries from text.

5. Integrations on personal accounts

The payment provider, the email service and the calendar were connected with whatever account was to hand, often the builder's own. That person leaving, changing a password or losing their phone breaks the business, and in the meantime they hold access the business cannot revoke.

How to check: list every connected service and the account that authorised it.

How to close it: reconnect each one through an account the business owns, with access given to named people, and write the list down.

6. Nothing watching

No error reporting, no login alerts, no record of who changed what. A breach in this state goes unnoticed until a customer reports it.

How to close it: error reporting to a person, an audit trail on sensitive tables, and a monthly look at who has access to what.

Doing this properly

Several of these checks are quick. Closing the holes well is engineering work, and it is where a person who has run software in production earns their keep: writing the policies, moving the secrets, adding the server-side checks and proving each one with a test. Orqen does this review and fix for businesses running on AI-built apps, as part of the software and systems work we do. If the app is also misbehaving in other ways, why vibe-coded apps fail at scale covers the wider picture.

Frequently asked questions

My app passed the tool's built-in security scan. Is it safe?

A scan that passes is good news about the things the scan checks. Lovable's documentation describes its scan checking database access rules, dependencies and connectors. It does not know what your business counts as sensitive, who should see what, or which account authorised your payment provider. Those need a person.

Do I have to tell customers if data was exposed?

That depends on where you and your customers are and what was exposed. Find out what happened first, with logs, and then take advice. We help with the first part and will say plainly what we found.

Can these holes be closed without rebuilding?

Almost always. Policies, secrets, server-side checks and account ownership are corrections to an existing app, not a new one.

How often should an AI-built app be checked?

After every significant change, and on a regular schedule regardless. The point of ongoing care is that someone is looking before a customer is.

Talk to us about your app

If you are not sure whether your app has any of these holes, a short call is the quickest way to find out what to check first. Book a call with us and we will take it from there.

Tell us what your business repeats.

One short call. A clear plan and a fixed price before anything starts.