Vibe coding security means checking an app built with AI tools such as Lovable, Cursor, Bolt or Replit for the holes those tools leave behind. The code usually works. What it often lacks is the protection around it: who may see which data, where the keys are kept, and what stops abuse.
- The pattern: AI tools now rarely write the classic bugs. They skip the security controls instead: access rules, limits, secrets handling.
- The biggest risk: one customer seeing another customer’s data. In one scan, 24,664 apps on a popular AI builder’s database returned records with no login at all.
- What to do: run the 30-minute check below on a copy of your app, fix data access and secrets first, and have an engineer review it before you take payments or personal data at scale.
Why AI-built apps leak data
An AI coding tool builds what you describe. If you ask for a dashboard where users see their projects, you get one, and it works in every demo. What you did not ask for, you usually do not get: the rule that stops user A from loading user B’s projects, the limit that stops a script from creating 10,000 accounts, the setting that keeps the database key out of the browser.
Independent tests this year show exactly that pattern. When the security firm Tenzai had five AI coding agents build the same three apps, none of the 15 apps contained an exploitable SQL injection or cross-site scripting flaw, the classic bugs with well-known rules. But the agents mostly failed to build security controls at all, and all five introduced server-side request forgery. Four of the five let customers place orders with a negative quantity.
The vulnerability study behind SecurityWeek’s July report found 434 exploitable issues in three AI-built apps. The largest groups were ways to overload the app (about 21%) and broken authorization (about 20%). The 23 critical findings were led by hardcoded or default secrets. And access bugs grew with the app: 11% of the findings in the two small apps, 28% in the larger one.
The practical consequence for a founder: an AI-built app that passed your own testing can still hand its data to anyone who opens the browser’s developer tools.
Where vibe-coded apps break: the six usual holes
| Hole | What it looks like | What it costs you |
|---|---|---|
| 1. Data access | The database or API returns rows to anyone who asks, or to any logged-in user, not only their owner | A data breach you must report, and lost customers |
| 2. Secrets in the wrong place | Admin database keys, payment or AI provider keys in the front-end code or in the repository | Someone else reads your data or spends your money |
| 3. Login logic | Checks that look right but are inverted, missing on some pages, or done only in the browser | Anyone reaches admin pages or other accounts |
| 4. No limits | Unlimited logins, sign-ups, uploads or AI requests | Account takeovers, spam, and a cloud or AI bill you did not plan |
| 5. Business rules | Negative quantities, prices set in the browser, coupons reused without limit | Direct loss of money |
| 6. Old and unknown parts | Packages nobody chose, debug mode left on, outdated versions | Known holes that attackers scan for automatically |
The first one is the most common and the most expensive. Many AI app builders put the database behind Supabase, where a public key in the browser is normal and safe only when row-level security rules decide who may read each row. When those rules are missing or too broad, the data is open. Researchers at Crissy Field scanned 159,041 projects on Lovable: of the 34,545 using Supabase, 24,664 returned database records with no authentication, and email addresses were readable on 7,403 sites. Lovable’s position is that this is a known configuration problem across Supabase projects, not a hack of its platform.
The third one is subtler. In February, The Register reported an app on the same platform whose login check had been written the wrong way round: it blocked signed-in users and let anonymous visitors through. It exposed 18,697 user records. The platform pointed out that it offers a security scan before publishing and that acting on it is up to the owner.
A 30-minute vibe coding security check
You can run most of this yourself, without a security background. Use a test copy of the app if you have one, two test accounts, and your browser’s developer tools (F12, then the Network tab).
| Check | How | Bad sign |
|---|---|---|
| Another user’s data | Log in as user A, open a record, copy its address or the request in the Network tab. Log in as user B and open the same address | User B sees user A’s record |
| Data without login | Open the same address in a private window | Anything loads |
| Database rules | If you use Supabase: Database, then Tables, and check that row-level security is on for every table with customer data | Any table with customer data shows it disabled, or its rule only checks that someone is logged in |
| Keys in the browser | In developer tools, search the loaded files for “secret”, “service_role”, “sk_” and your AI provider’s name | Any key other than a public one appears |
| Admin pages | As a normal user, type the admin address directly, e.g. /admin | It opens, or the data behind it loads |
| Limits | Try a wrong password ten times; sign up twice in a minute | Nothing slows you down |
| Business rules | Change a quantity to -1, or a price in the request, before checkout | The order goes through |
A clean result does not mean the app is secure. It means the most common and most damaging holes are not wide open. Server-side request forgery, unsafe file uploads and dependency problems need an engineer and a code review.
What to fix first
- Close data access today. Turn on row-level security or the equivalent for every table, with rules that tie each row to its owner. Then repeat the user A and user B test.
- Rotate any exposed key. If a secret key was ever in the browser or the repository, create a new one and revoke the old one. Removing it from the code is not enough: assume it was copied.
- Move checks to the server. Login, roles, prices and quantities must be checked on the server, not only hidden in the interface.
- Add limits. Login attempts, sign-ups, uploads and AI calls, with a spending cap at your AI and cloud providers.
- Find out who saw what. If data was open, check the logs for unusual reads. Personal data of people in the EU may mean you have to report a breach within 72 hours, so ask a lawyer early.
Tell us what it does and what it was built with. You’ll get a reply within 1 business day with what we would check first.
When to bring in an engineer
Building with AI tools is a fast way to test an idea. The point at which you need a senior engineer to look at it is usually one of these:
- Before you take payments or store personal, health or financial data.
- Before a customer’s security questionnaire or a due diligence review asks how access is controlled.
- When the app grows. The SecurityWeek study saw access bugs rise from 11% to 28% of findings as the app got larger, so a product that was fine at ten users may not be at a thousand.
- When nobody can explain the code. If the person who prompted it has moved on, you own a product nobody understands.
What a review adds is not a list of tool warnings. It is someone reading the access rules against how the product is meant to work, fixing them, and leaving tests that fail if they ever break again. That is the same first step we take in a product takeover: read the code and the servers before promising anything.
Make your AI tool help, not hide
If you keep building with AI tools, give them the rules they skip. Most tools accept a standing instruction or rules file. Add lines like these:
- Every new table gets row-level security in the same step, with rules scoped to the record’s owner.
- No secret key in front-end code. Secrets come from server-side environment variables only.
- Every permission check runs on the server. Prices, quantities and roles are never trusted from the browser.
- Every public endpoint has a rate limit.
Then ask the tool to review its own work against those rules, and still run the 30-minute check. In Veracode’s tests, cited by the Cloud Security Alliance, 45% of AI-generated code samples failed basic security checks, so the tool’s confidence is not evidence.
What to do this week
- If your app is live with real users: run the user A and user B test today. If it fails, fix data access and rotate keys before anything else.
- If you are about to launch: run the full check, fix what fails, and book a review before you switch on payments.
- If you have inherited an AI-built app: treat it like any takeover: get the accounts in your name, read the code, then change it.
Our security hardening service covers exactly this: access rules, secrets, limits and the updates underneath. If the app needs more than a fix, our takeover and modernisation work takes it over and keeps it running, as we did for KAIA, a marketplace that reached live payments after we took it over. To keep a senior team on the product month to month, see how we work with clients. For the account-level side of the same problem, read what the 1Password breach showed about GitHub and deployment access.
Quick answers
What is vibe coding security?
Vibe coding security is checking and fixing an app built with AI coding tools for the security controls those tools tend to skip: who may see which data, where secret keys are kept, server-side checks and limits against abuse.
Are vibe-coded apps secure?
Often not by default. Independent tests in 2026 found AI tools rarely write classic bugs such as SQL injection, but often leave out access rules, rate limits and safe handling of secrets.
What is the most common security problem in Lovable or Supabase apps?
Missing or too-broad row-level security rules, which let anyone with the public key read data. One scan found 24,664 Supabase-backed Lovable projects returning records with no login.
How do I check if my AI-built app leaks data?
Log in as one test user, open a record, then try the same address as a second user and in a private window. If either sees the data, access control is broken.
Can I ask the AI tool to fix the security issues?
Yes, give it explicit rules (row-level security on every table, no secrets in front-end code, checks on the server, rate limits) and ask it to review its work. Still test the result yourself or have an engineer review it.
When should a founder get a security review of a vibe-coded app?
Before taking payments or storing personal data, before a customer’s security questionnaire or due diligence, and when the app grows or nobody can explain the code any more.
What should I do if my app’s data was exposed?
Close the access rule, rotate any exposed keys, check logs for unusual reads, and get legal advice quickly: under GDPR a personal data breach may have to be reported within 72 hours.
Sources
Version numbers, dates and commands in this article come from the primary sources below. Check them before you act, since advisories are updated.
- Cybernews: Apps built on Lovable AI expose passport details and 200,000 chat messages (Crissy Field research)
- The Register: Lovable-hosted app littered with basic flaws exposed 18K users, 27 February 2026
- SecurityWeek: Vibe-coded apps riddled with exploitable security flaws, 22 July 2026
- SecurityWeek: Vibe coding tested: AI agents nail SQLi but fail miserably on security controls, 15 January 2026
- Cloud Security Alliance: Vibe coding security debt, 6 April 2026
Want this handled for you? Legacy modernisation & takeover · Cloud & DevOps on AWS · Security hardening · Maintenance & support
Serhii runs Shapelab, a web and mobile development agency in Tallinn, Estonia. The team builds web products, takes them over from other teams and looks after them in production, servers included.