Is vibe coding safe? What to check before payments or customer data

Short answer
- Vibe coding is safe enough for prototypes and internal tools. It needs checking before strangers log in, and checking again before you take money.
- A researcher scanned 1,645 published Lovable apps in March 2025 and found 170 of them (about 10%) let outsiders read or change data. That became CVE-2025-48757, scored 9.3 out of 10.
- Veracode tested more than 100 AI models on 80 coding tasks in 2025. The code failed its security tests 45% of the time.
- The fault behind that CVE is simple: one customer can see another customer’s data. You can test for it yourself in about 10 minutes with 2 accounts.
- If you hold personal data about people in the UK, UK GDPR applies to you, sole traders included. The ICO fee is £52 or £78 a year for most small businesses.
Is vibe coding safe? For a prototype, yes. For an app that holds strangers’ details or takes their money, only once somebody has checked it. And that somebody can be you for more of it than you’d think.
Almost everything written about vibe coding security is aimed at developers. This is for the person who owns the app: you built something with Lovable, Bolt, Replit or Cursor, it works, and you’d like to know what could go wrong before customers arrive.
I checked every incident, number and rule below on its original source on 4 December 2026. Further down there’s a 14-point checklist you can run without reading a line of code.
Is vibe coding safe?
It depends what the app holds. An AI-built app with no logins and no personal data carries very little risk. One with customer accounts, uploads or payments is risky until it’s been tested, because the AI builds what you describe and security is the part people forget to describe. Working and safe are 2 separate tests.
What has actually gone wrong with vibe-coded apps?
2 documented incidents and 2 pieces of research are worth your time. I’ve left out stories I couldn’t trace to a primary source, including the Tea app breach, which hasn’t been confirmed as a vibe-coding failure.
The Lovable data exposure (CVE-2025-48757)
In March 2025 a researcher called Matt Palmer noticed that a Lovable-built site would hand over its whole users table if you edited a request in the browser. He then scanned 1,645 projects from Lovable’s public gallery of launched apps. 170 of them had the same weakness.
What was readable? Names, email addresses, phone numbers, payment details and API keys. On one site he added a record marked as paid without paying. His scan only looked at each app’s homepage, so the real figure may be higher. (For balance: Palmer worked at Replit, a Lovable competitor, at the time.)
The official record scores it 9.3 out of 10 and tags it as disputed. Lovable’s position is that each customer is responsible for protecting their own app’s data. So on Lovable, by its own account, the security of your app is your job.
The Replit database deletion (July 2025)
Jason Lemkin, who runs the SaaStr community, was building an app with Replit’s AI agent. He reported that the agent deleted his production database, ignored a freeze on changes and made up data.
Replit’s chief executive responded publicly, refunded him, and said Replit would separate development and production databases automatically so it couldn’t happen that way again. Lemkin was first told the data couldn’t be restored, then wrote that the rollback did work. No hacker was involved: an AI agent with access to live data damaged it.
What the research measured
2 studies get quoted a lot. Here’s what each one tested.
| Source | What it tested | Result | What it doesn’t tell you |
|---|---|---|---|
| Veracode GenAI Code Security Report (July 2025) | 80 coding tasks given to more than 100 AI models in Java, JavaScript, Python and C#. Each task had a safe and an unsafe way to finish it. | 45% of the results failed security tests. By language (Veracode’s summary): JavaScript 43%, Python 38%, C# 45%, Java 72%. 86% of relevant samples failed to block cross-site scripting. | It tested snippets of code from raw models, not finished apps from Lovable or Bolt. Veracode sells security scanning. |
| “Is vibe coding safe?” (Carnegie Mellon, arXiv 2512.03262, latest version September 2026) | 186 feature requests from real open-source projects, given to 12 AI coding agent setups. Every task was one where a human had originally written a vulnerable version. | The best-known setup produced working code 57% of the time. 11.8% of its solutions were secure. Adding security hints to the request didn’t fix it. | The tasks were picked because humans got them wrong too, so they’re harder than average. |
| Palmer’s Lovable scan (March 2025) | 1,645 real published apps, homepage only. | 170 (10.3%) exposed data to anyone. | One platform, one month, one type of fault. |
How likely is it that your app has a problem? I couldn’t find a measured breach rate for vibe-coded apps, and I won’t invent one. The only count of real, live apps is Palmer’s: roughly 1 in 10 was open to anyone who looked. Assume yours might be, and test.
What are the security risks of vibe coding, in plain English?
There are 8 that matter to a business owner. The first is the one behind the Lovable CVE.
1. Who can read whose data
Developers call this row-level security, or RLS. Your database is one big filing cabinet holding every customer’s records, and RLS is the set of rules that says “Sarah may open Sarah’s folder only.”
If the rules are missing, the login screen still works and the app looks fine, but anyone who asks the database directly gets every folder. Supabase, the database service those Lovable apps ran on, says of a table with the rules switched off: “Anyone with your project URL can read, edit, and delete all data in this table.”
2. Secret keys left in the app
Your app uses keys to talk to Stripe, its database and AI services. Some are designed to be public. Others are master keys, and anything that runs in your customer’s browser can be read by that customer. Supabase’s docs say a secret key “bypasses every Row Level Security policy you have”.
3. Logins and password resets
The sign-in page usually works. The edges go wrong: reusable reset links, and admin pages that hide the button but leave the door open.
4. Payments and webhooks
When someone pays, Stripe sends your app a message called a webhook. If your app doesn’t check the message really came from Stripe, Stripe warns that an attacker can send fake ones to trigger things like fulfilling orders or granting account access. The other fault is letting the customer’s browser mark an order as paid, which is what Palmer did.
5. File uploads
In Supabase, a file in a public bucket can be downloaded by anyone with its link, logged in or not. Fine for a logo. Bad for a passport scan.
6. No backups
On Supabase, automatic daily backups come with the paid plans (7 days kept on Pro), and free projects are told to export their own. Uploaded files aren’t in database backups on any plan.
7. Test data mixed with live data
If your AI tool experiments on the same database your customers use, one bad instruction can damage real records. That’s the Replit story.
8. Dependencies
Your app sits on free code packages written by other people. When a flaw is found in one, your app has it until someone updates.
Is Lovable secure? Is Supabase secure?
Most of the incidents I could verify came from how individual apps were set up on these platforms, which is the part you own.
One was the platform’s own. In April 2026 Lovable confirmed that the chat history and source code of public projects had been open to any Lovable user with the link, from 3 February to 20 April 2026. It says private projects and Lovable Cloud weren’t affected. If your project was public in that window and its chat or code held keys, replace them.
Both have added tools since 2025. Lovable now checks database rules and vulnerable packages when you open the publish dialog. Supabase has a Security Advisor that flags tables with no rules.
Use them, and know their limits. Palmer’s complaint about Lovable’s first scanner was that it checked a rule existed without checking the rule was right. Lovable’s docs today say its checks can’t guarantee your app is secure and that apps handling sensitive data should get a professional review.
Stuck builds and errors are a separate guide: what to do when Lovable isn’t working.
A vibe coding security checklist you can run without a developer
14 yes or no checks, 100 points, 3 stages. Tick them off for a score and a report you can copy. What to click is underneath.
App safety check
App safety check: 14 checks before strangers, users and payments
Answer yes, no or not sure. You get a score out of 100, what to fix first, and a report you can copy or print.
| Stage | Check | Points |
|---|---|---|
| Before you show anyone | 1. A second account can’t see the first account’s data | 10 |
| Before you show anyone | 2. Private pages bounce you to login when you’re signed out | 6 |
| Before you show anyone | 3. No secret keys in the app’s browser code | 8 |
| Before you show anyone | 4. Your platform’s security scan shows no critical findings | 6 |
| Before real users | 5. Password reset works, and the link works once only | 6 |
| Before real users | 6. A normal user can’t open admin pages | 7 |
| Before real users | 7. Private uploads can’t be opened by link when signed out | 6 |
| Before real users | 8. A backup exists and you’ve restored from it once | 8 |
| Before real users | 9. Testing happens on a separate copy from live data | 6 |
| Before real users | 10. Privacy basics are done (notice, ICO fee, deletion on request) | 7 |
| Before you take money | 11. The price and “paid” status can’t be changed from the browser | 8 |
| Before you take money | 12. Payment messages from Stripe are verified | 8 |
| Before you take money | 13. One real payment and one refund have gone through on live keys | 7 |
| Before you take money | 14. Packages are up to date and you know who to call | 7 |
| Score | Condition | Result |
|---|---|---|
| 0 to 29 | Or any “no” in stage 1, whatever the score | Not ready for strangers |
| 30 to 69 | All 4 stage 1 checks passed | Ready for a small test with people you’ve invited |
| 70 to 100 | All of stage 1 and all of stage 3 passed | Ready for real customers and payments |
Stage 1 is worth 30 points, stage 2 is worth 40 and stage 3 is worth 30. “Not sure” scores the same as “no”.
Before you show anyone
- The 2-account test. Create account A and add an order, a note or a profile. In a private browser window, create account B and look for A’s data in lists and search. If a page address contains an ID (like /orders/1042), swap in A’s while signed in as B. Bad result: B can see or edit anything of A’s.
- The signed-out test. Copy the address of a page that needs a login, sign out, and paste it into a private window. Bad result: the page loads, even for a second.
- The key search. Open your app in Chrome on a computer, press F12, then Ctrl+Shift+F (Cmd+Option+F on a Mac) and search for sk_live, sk_test, rk_live and sb_secret. Bad result: any match. Keys starting pk_ or sb_publishable are meant to be public.
- The platform scan. In Lovable, open More, then Security. In Supabase, open the Security Advisor. Bad result: anything marked critical or error, especially “RLS disabled”.
One limit: check 1 tests your app through its own screens. The Lovable flaw was reached by talking to the database directly, which only check 4 or a specialist can test.
Before real users
- Password reset. Use a reset link, then try the same link again. Sign up with a new email and try the app before confirming it. Bad result: the old link still works, or an unconfirmed account gets in.
- Admin pages. Copy the address of an admin page, sign in as a normal user and paste it. Bad result: anything other than a refusal.
- Uploads. Upload a file, copy its link, and open the link in a private window while signed out. Bad result: a private file opens. (No uploads in your app? Score a yes.)
- Backups. Find your platform’s backup page, then restore one into a test project or export the data and open the file. Bad result: no backup, or one you’ve never restored.
- Separate test data. Ask your AI tool: “Is there a separate development database, or are you changing the live one?” Bad result: one database for everything.
- Privacy basics. You have a privacy notice, you’ve checked whether you owe the ICO fee, and you know how you’d delete one person’s data on request. Bad result: a shrug on any of them.
Before you take money
- Price tampering. Ask your AI tool: “Where is the price set and where is an order marked as paid: in the browser or on the server?” Then paste the address of a paid page without paying. Bad result: “in the browser”, or the page opens.
- Verified webhooks. Ask: “Does the Stripe webhook verify the signature before acting? Show me the line.” Bad result: no, or a vague answer.
- Live payment. Stripe’s test keys start pk_test and sk_test, live keys start pk_live and sk_live. Switch to live, buy your own product with a real card, then refund it. Bad result: the order is missing, doubled, or the refund never reaches your app.
- Updates and help. Run the package check in your platform’s security view. Write down who you’d call if the app was breached at 9pm on a Friday, and how you’d take it offline. Bad result: critical packages outstanding, or no name written down.
This checklist covers security only. Our earlier post, is my vibe-coded app ready?, covers launch readiness: bugs, phone layout and store review. Heading for the App Store? Run both, plus the app store review checklist.
Is there a security prompt I can give my AI tool?
Yes. Paste this into Lovable, Cursor or Claude Code before you start the checklist:
Act as a security reviewer. Don’t change any code yet. List every database table and say, for each, who can read and write it. List every key or secret the app uses and whether it’s in browser code. Tell me whether the payment webhook verifies its signature, where prices are set, and whether file storage is public or private. Mark each finding critical, medium or low, and explain it for a non-developer.
Fix one finding at a time and re-run the 2-account test after each. Treat a clean answer with care: the AI is marking its own homework.
Is vibe coding ready for production?
For some apps, yes. “Production” just means real people rely on it, and a booking form for your own 40 clients is a very different bet from a marketplace holding payments and ID documents for strangers.
Why should AI-generated code be reviewed before production use? Because the 45% and 11.8% figures above describe code that ran fine. The more sensitive the data, the less should rest on code no person has read.
Sometimes the cheaper answer is the right one. For a standard business app (loyalty cards, bookings, ordering, push notifications) you may not need generated code at all. On an app builder you switch features on, so there’s no freshly written database or login code to check.
Too custom for that? The comparison of no-code, AI and custom development sets out the middle options, including an AI-assisted build where developers finish and secure what the AI started. What the tools can and can’t do is in can AI build an app?
What does UK data protection law expect from a vibe-coded app?
The same as from any other app. If you hold personal data about people (names, emails, addresses, order history), UK GDPR applies, however the code was written. This is general information, not legal advice. 4 points from the ICO’s own guidance:
- Size doesn’t exempt you. The ICO says data protection law applies even if you employ no staff at all, sole traders included.
- There’s usually a fee. Most organisations using personal data pay the ICO a data protection fee: £52 a year for micro organisations (turnover up to £632,000 or 10 staff or fewer) and £78 for small and medium ones. Some are exempt.
- Security must be “appropriate”. The law doesn’t list specific measures. It expects protection that fits the risk, the ability to restore data after an incident, and regular testing. You stay responsible for the providers you use, database host included.
- Breaches have a clock. If a breach is likely to put people at risk, you must report it to the ICO within 72 hours of becoming aware of it, and keep a record of every breach whether you report it or not.
“The AI wrote it” won’t work as an excuse. “We ran these checks on this date” is a record worth having, and the checklist report gives you one.
Who owns the code is a separate legal question, covered in who owns AI-generated code?
When is a professional review worth paying for?
Pay for one when a mistake would cost more than the review. In practice that’s 5 situations:
- You failed check 1, 3, 11 or 12 and the AI can’t fix it cleanly after 2 attempts.
- You’re about to take payments from the public.
- You hold anything sensitive: health details, children’s data, ID documents, financial records.
- A business customer has sent you a security questionnaire.
- You answered “not sure” to more than 3 checks. Plenty of owners do, and a second pair of eyes settles it.
If none of those apply (a prototype, an internal tool, a waiting-list page), keep your money. Run the checklist and fix what it finds.
When you do need help, our Expert Review looks at one agreed problem for $99. “Can other users see each other’s data?” is a perfectly good one. Book the next step within 14 days and the $99 comes off it.
Know what you’re buying. An Expert Review is a developer examining one specific problem. A penetration test is a bigger job, and if you hold health or financial data at any scale you should commission one from a specialist security firm as well. No review makes an app safe forever, either: every new feature you prompt into it is new code to check.
More on the decision: when to hire a developer for your AI-built app and what vibe coding cleanup costs. The fixes themselves sit under vibe code rescue.
FAQ
Are vibe coded apps safe?
Some are and some aren’t, and you can’t tell from the outside. A March 2025 scan of 1,645 published Lovable apps found about 1 in 10 exposed data to anyone.
Can AI-generated code contain security vulnerabilities?
Yes. Veracode’s 2025 test of more than 100 AI models found 45% of the code samples failed security tests, even though the code worked.
Has Lovable had a security breach?
There’s a documented vulnerability, CVE-2025-48757, where apps built on Lovable exposed their databases because access rules were missing or wrong. Lovable disputes it, saying each customer is responsible for securing their own app. Separately, Lovable confirmed that chat history and source code of public projects were accessible to other Lovable users from 3 February to 20 April 2026.
Is vibe coding a website safe?
A brochure website with no logins and no stored customer data carries little security risk however it was built. The risk starts with accounts, stored personal details or payments.
Does UK GDPR apply to an app I built with AI?
Yes, if it holds personal data about people in the UK. The ICO says the law applies to sole traders too, and most small businesses pay a fee of £52 or £78 a year. This is general information, not legal advice.
Last Updated on December 4, 2026 by Ian Naylor