Is Vibe Coding Safe? Security Risks and a Pre-Launch Checklist
For anyone who built an app or website by describing it to an AI: the eight risks that matter, how to check each one without reading code, and what happened when we asked an AI to check its own app.
Vibe coding is safe enough to build and test with, but not safe to put real people's data or money on without checks. AI tools write code that works, not code that is guarded: in Veracode's 2026 tests, only 56% of AI-written code passed its security checks. Before anyone else uses your app, check five things: secret keys are hidden, each user sees only their own data, the database is locked, odd input is refused, and logins can't be guessed or abused.
What This Guide Covers
- The eight real risks, in plain English
- How to check each one without reading code
- A prompt that fixes each risk
- A 12-point pre-launch checklist
- Our test: an AI audited its own app in 3 prompts
- Why vibe coding gets called bad
New to the method? Start with how to vibe code, step by step, then come back before you launch.
TL;DR Quick Summary
Is vibe coding safe? It is as safe as the checks you run before launch. AI-written code often works and still leaves doors open. The checks that matter most: secret keys out of the browser, each user limited to their own data, database access rules on, every input checked on the server, logins that refuse common passwords and can't be used to lock people out, and personal data kept out of code uploads. Our test: an AI built a login system that kept each user's data apart, then, only when asked, found nine more problems in its own work and fixed the ones we picked.
Try AI Vibe Coding →Table of Contents
Why it happens, the eight risks, the checklist, then our test in full.
- Why vibe-coded apps go wrong
- The eight risks at a glance
- Risk 1: Secret Keys Anyone Can See
- Risk 2: One User Can See Another User’s Data
- Risk 3: A Database With No Lock on It
- Risk 4: Trusting Whatever People Type
- Risk 5: Logins That Are Easy to Break
- Risk 6: Packages Nobody Checked
- Risk 7: Data Kept in the Wrong Place
- Risk 8: Code Nobody Understands
- What has already gone wrong
- The pre-launch security checklist
- Our test: we asked the AI to audit its own app
- Best practices for vibe coding safely
- Who is responsible for what
- Why vibe coding gets called bad
- When not to vibe code alone
- Where vibe coding security is heading
- Frequently asked questions
Why Vibe-Coded Apps Go Wrong
When you vibe code, you judge the result by using it. Does the button work? Is the total right? An AI coding tool is built to pass exactly that test, so it aims for "it works". Security is the part you cannot see by clicking around: who else can open this page, what happens if someone types something strange, where the keys are kept. Unless you ask, those questions often go unanswered.
The workflow that makes the asking routine is in our vibe coding best practices guide.45% of tasks
In Veracode's 2025 tests of more than 100 AI models, the code they wrote added a security flaw in 45% of cases across 80 coding tasks.
56% pass, and flat
Veracode's 2026 report put the average security pass rate at 56%, "virtually unchanged" from the year before. Newer models write better code, not safer code.
84% use AI tools
84% of developers in Stack Overflow's 2025 survey use or plan to use AI tools, and more of them distrust the output's accuracy (46%) than trust it (33%).
None of this means you should stop. It means the last step before launch is a security check, and the person running it has to be you, with the AI's help. Andrej Karpathy, who named vibe coding in February 2025, described it as a way to "forget that the code even exists". That is fine for a weekend project. It stops being fine the moment someone else's data is inside. For what the term means in full, see what vibe coding is.
Sources: Veracode press release, 30 July 2025, and 2026 GenAI Code Security Report release, 28 July 2026; Stack Overflow Developer Survey 2025, AI section; Andrej Karpathy on X, 2 February 2025.
The Eight Risks at a Glance
Tap a risk to jump to it. The rating is ours: High means a single mistake can expose other people's data or money; Medium means it makes a breach easier or harder to recover from.
Risk 1: Secret Keys Anyone Can See
Your app talks to other services (payments, maps, email, AI) using secret keys. If the AI puts a key in the part of the app that runs in the visitor's browser, anyone can copy it and run up your bill or read your data. The same rule applies when you add AI to an app: the key stays on a server.
Signs your app is exposed
- You pasted a key into the chat and asked it to "make it work"
- The app calls a paid service straight from the page
- There is no "secrets" or "environment" setting anywhere in the project
Check it in two minutes
- Open your app, right-click, choose View Page Source, and search for the first few characters of each key
- Ask the AI: "List every secret key this app uses and where each one is stored"
- Check the tool's secrets setting; Replit, for example, encrypts what you store there
List every secret key or password this app uses. Move any that can be seen in the browser to the server or the tool's secrets setting, and tell me which ones you moved.
Risk 2: One User Can See Another User's Data
The app checks that someone is logged in, but not that the record they ask for is theirs. Change a number in the address bar and you are looking at a stranger's order. This is the most common serious web flaw on OWASP's 2025 list.
Signs your app is exposed
- Addresses with numbers in them, such as /orders/1042
- The app stores anything per person: bookings, notes, files, orders
- You never tested with a second account
Check it in two minutes
- Make two accounts. Create something with the first. Log in as the second and try to open it by its address or number
- Log out and try the same address again
- Ask the AI to show you the rule that stops this
Every record must belong to one user. Check every page and action so a logged-in person can only see, change or delete their own records. Show me how you tested it with two accounts.
Risk 3: A Database With No Lock on It
Many browser tools connect your app to a hosted database. If its access rules are left off, anyone who finds the address can read or change the tables, without logging in. That is what researchers found in 2025 in 170 apps built with one popular tool.
Signs your app is exposed
- The tool set up a database for you and you never looked at its settings
- The tool shows a warning about "row level security" or "policies"
- Data appears in the app without anyone logging in
Check it in two minutes
- Open the database settings and look for access rules on every table
- Run the tool's own security check; Lovable, Bolt and Base44 all document one
- Ask: "Can someone who is not logged in read any table?"
Check every database table. Turn on access rules so people can only read and change their own rows, and nobody can read anything without logging in. List each table and the rule you set.
Risk 4: Trusting Whatever People Type
Every box in your app is a way in. If the app trusts what people type, a name field can carry code that runs in other people's browsers, or a number field can break your totals. AI-written code fails at this often: Veracode found models failed to defend against cross-site scripting in 86% of its 2025 tests.
Signs your app is exposed
- Free-text boxes: names, comments, messages
- Numbers that feed money or totals
- Anything one person types that another person later sees
Check it in two minutes
- Type
<img src=x onerror=alert(1)>into a name box and save it. If a pop-up appears anywhere, it is a problem - Try a 5,000-character name, a negative price, letters in a number box
- Check the rule holds on the server too, not only on the page
Check every box people can type into. Show what they type as plain text, never as code, and refuse lengths and values that make no sense. Make the server check the same rules as the page.
Risk 5: Logins That Are Easy to Break
Logins that accept "password", let anyone try thousands of guesses, or can never be reset leave accounts open to anyone with time. A careless lockout rule can also let a stranger lock your users out on purpose. Our own test found both.
Signs your app is exposed
- Your app has sign-up and log-in
- There is no limit on wrong passwords, or the limit locks the whole account
- There is no way to change a password or log out other devices
Check it in two minutes
- Try to sign up with "password" and "12345678"
- Type the wrong password ten times for a friend's account, then ask the friend to log in from their phone
- Look for "change password" and "log out everywhere"
Refuse very common passwords, slow down repeated wrong guesses without letting strangers lock someone out, and let people change their password and log out their other devices.
Risk 6: Packages Nobody Checked
AI tools install ready-made code packages for you. Some are out of date, and some do not exist at all: a 2025 USENIX study found commercial models suggested non-existent packages in at least 5.2% of cases and open models in 21.7%. Attackers register those invented names and fill them with malware.
Signs your app is exposed
- The project has a long list of installed packages you never chose
- An install step failed and the AI tried "a different package"
- The app has not been updated in months
Check it in two minutes
- Ask for the list of packages and what each one is for
- Look up any unfamiliar name before you accept it
- Run the tool's dependency or security scan if it has one
List every package this app installs, what it is for, and whether it is well known and up to date. Remove anything we do not need.
Risk 7: Data Kept in the Wrong Place
Apps collect more than you think: emails, names, phone numbers, sometimes photos. If that data sits next to the code, it can be uploaded with the code; if it is collected but never needed, it is a liability you are keeping for no reason. In our test the agent spotted that the saved accounts would have been uploaded with the code.
Signs your app is exposed
- The app saves anything about people
- You use version control (Git) or share the project folder
- You collect a field "just in case"
Check it in two minutes
- Ask where every piece of personal data is stored
- Ask whether the data folder is excluded from uploads
- Delete any field you do not use
Tell me every piece of personal data this app collects and where it is stored. Make sure saved data is never uploaded with the code, and remove anything we do not need.
Risk 8: Code Nobody Understands
Vibe coding piles up code fast. If nobody understands how it works, every fix is a guess, and a later change can quietly undo an earlier security fix. In July 2025 an AI coding agent deleted a company's production database during a code freeze; the tool's chief executive called it unacceptable.
Signs your app is exposed
- Fixes keep breaking other things
- The AI rewrites large parts of the app for small requests
- There are no saved versions to go back to
Check it in two minutes
- Ask the AI to explain each part of the app in plain English
- Save a version after every change that works
- Keep test data and real data apart, and never give an agent unchecked access to the real thing
Explain how this app is organised in plain English, one paragraph per part. Then list the riskiest parts to change and how I can test them after every change.
What Has Already Gone Wrong
These are documented cases, not hypotheticals. Each one maps to a risk above.
170 Lovable projects left open
Researchers found 303 unprotected database endpoints across 170 of 1,645 projects built with Lovable (10.3%). Missing access rules let people who were not logged in read or write data, including personal details and keys. Logged as CVE-2025-48757. Lovable disputes the finding, saying each customer is responsible for their own access rules.
An AI agent deleted a live database
An AI coding agent on Replit deleted SaaStr founder Jason Lemkin's production database during a code freeze. Replit's chief executive called it "unacceptable and should never be possible".
205,474 invented package names
A USENIX Security study of 576,000 code samples from 16 AI models found 205,474 different package names that did not exist. Attackers can publish malware under such names.
Security pass rate stuck at 56%
Veracode's tests found AI models failed to defend against cross-site scripting in 86% of cases in 2025. In 2026 the average security pass rate was still 56%.
Sources: Matt Palmer, statement on CVE-2025-48757 (29 May 2025) and the Tenable CVE entry; The Register, 21 and 22 July 2025; Spracklen et al., USENIX Security 2025; Veracode releases of 30 July 2025 and 28 July 2026.
The Pre-Launch Security Checklist
Run this before anyone other than you uses the app. Most checks take a minute. Each check says when it applies, so a calculator that stores nothing can skip most of them.
Keys and data
- No secret key visible in the pageTest: View Page Source and search for each keyApplies when: your app uses any paid or private service
- Database access rules onTest: Tool's database settings or security checkApplies when: the tool created a database
- Personal data kept out of code uploadsTest: Ask where data is stored and what is excludedApplies when: you save personal data
- A saved version and a backup of the dataTest: Restore once, before you need toApplies when: always
Who sees what
- Each user sees only their own dataTest: Two accounts: open user A's record while logged in as BApplies when: anything is saved per person
- Logged-out visitors see nothing privateTest: Log out and reopen a private addressApplies when: there is a login
- Odd input refused, shown as textTest: Code-like text, very long text, negative numbersApplies when: people can type anything
- Server checks the same rules as the pageTest: Ask the AI to show the server-side checkApplies when: any rule matters for money or data
Logins and launch
- Common passwords refusedTest: Try "password" and "12345678"Applies when: there is sign-up
- Guessing is slowed, but nobody can be locked outTest: Ten wrong tries on a friend's account, then they log inApplies when: there is a login
- Password change and log out everywhereTest: Find both in the account areaApplies when: there is a login
- HTTPS on every pageTest: Padlock in the address bar on the live linkApplies when: the app is used outside your own computer
For a full technical list for store apps (encryption, API security, compliance), our mobile app security guide goes deeper.
Our Test: We Asked the AI to Audit Its Own App
We took the bill-splitting app from our beginner's guide to vibe coding and asked an AI coding agent (Claude, inside Claude Code) to add accounts and saved bills, in plain English, the way a non-developer would. Then we tested it ourselves with the checklist above, asked the agent to check its own work, and compared. 3 prompts, about 15 minutes of agent time, on 5 October 2026. A third app, built from an empty folder, is written up in our Claude Code vibe coding guide.
"Add accounts so people can sign up and log in with an email and password, and save each bill so they can see their past bills later. Each person should only see their own bills."
A login system, a database and a "My past bills" list, all working. Each person really did see only their own bills. We ran the same two-account check on a client portal built with AI.
"Before I share it with my friends, please check the whole app for security problems. Don't change anything yet. List what you find in plain English, most serious first."
Nine problems, from "passwords can be read on the same Wi-Fi" to "anyone can lock a friend out", plus a list of what it checked and found solid.
"Please fix 2, 4, 5 and 7" (data kept out of the code upload, lockouts, common passwords, changing passwords, who has an account), plus one problem we had found ourselves.
All five fixed and tested by the agent. We re-tested every fix by hand and each one held.


What the first version already got right
- Each person saw only their own bills: asking for another person's bill by its number returned "not found"
- Code typed into a bill name was shown as plain text
- Passwords were stored scrambled with a slow, salted method
- Other websites could not act on a logged-in person's account
- The database file could not be downloaded through the app
What it raised only when we asked
- Anyone could lock a friend out with five wrong passwords
- "password" and "12345678" were accepted
- Sign-up told strangers which emails already had accounts
- The saved accounts would have been uploaded with the code
| Problem | Our checklist | AI's own review |
|---|---|---|
| Weak passwords accepted | Found | Found |
| Strangers can lock a friend out | Found | Found |
| Sign-up reveals who has an account | Found | Found |
| Plain http when shared on Wi-Fi | Found | Found |
| Saved data not excluded from code uploads | Missed | Found |
| Anyone on the network can sign up | Missed | Found |
| No password change or log out everywhere | Missed | Found |
| Slow connections never cut off | Missed | Found |
| Old Python with no security fixes | Missed | Found |
| Server saved a 999% tip the page warns about | Found | Missed |
Security Habits for Vibe Coding Safely
These habits prevent most of the risks above before they appear. They come from our own sessions and from the Cloud Security Alliance's 2025 guide for people building with AI.
Say who can see what in your first prompt.
"Each person should only see their own bills" was one sentence in our brief, and it is why the first version got access right.
Keep secrets out of the chat.
Put keys in the tool's secrets setting and refer to them by name. Treat a prompt like an email to a stranger.
Change one thing per prompt and test it.
Big rewrites can quietly undo an earlier security fix.
Ask for a security review before every launch.
Use the prompt from the checklist, and ask for the list before any changes. We compared it with a plain "Is this secure?" in our vibe coding prompt test.
Test with two accounts and while logged out.
Most data leaks show up in the first minute of this test.
Make the server check what the page checks.
A warning on the screen protects nobody if the server accepts anything.
Save versions and keep real data apart.
Never give an agent unchecked access to the live database.
Get a human review before payments or personal data.
A developer's hour costs less than one leak.

Cloud Security Alliance, "Secure Vibe Coding Guide", 9 April 2025: secrets out of code, validate every input, authorization on every endpoint, update dependencies, human review.
Who Is Responsible for What
How much of the checklist is yours depends on the route you take. A code-writing tool hands you the code and most of the responsibility. A hosted app builder runs the hosting and logins for you. Either way, what you collect and who you share it with stays your job. Compare the code-writing tools in our list of vibe coding tools, or see one tool's settings in our Base44 review.
| Area | Vibe coding tool (you get the code) | Hosted app builder, e.g. Appy Pie AI | Hiring a developer |
|---|---|---|---|
| Hosting and HTTPS | You or the tool's hosting | The platform | The developer sets it up |
| Logins and password storage | Whatever the AI wrote | The platform | The developer |
| Who can see which data | You must check the rules | Platform features; you choose who sees what | The developer |
| Secret keys | You must keep them out of the code | Usually entered in the builder's settings, not in published code | The developer |
| Security updates | You must apply them | The platform | Usually a paid contract |
| What data you collect | You | You | You |
Appy Pie AI's security page says its apps run on AWS with data at rest encrypted (AES-256), account passwords one-way hashed and salted, monthly vulnerability scans with Amazon Inspector and a third-party penetration test by Bishop Fox; its certification page lists ISO/IEC 27002:2022, ISO/IEC 27701:2025 and SOC certificates. Read 5 October 2026.
A builder takes the platform risks off your plate. It cannot decide for you what data you should collect, which is why the checklist still applies. If you would rather not maintain code at all, our guide to building an app with AI follows the builder route step by step.
Why Vibe Coding Gets Called Bad
Vibe coding gets called bad for two different reasons, and they deserve different answers. Our vibe coding pros and cons guide weighs both, with numbers from 26 apps we built.
What it does well
- Turns an idea into something you can try in minutes
- Lets people who do not code build their own small tools
- Makes prototypes cheap enough to throw away
- Writes the boring parts quickly for people who do code
Where it goes wrong
- Code that works but is not guarded
- Code nobody understands, so fixes become guesses
- Confident summaries that hide what was skipped
- Costs and limits that appear only when real users arrive
Our verdict: vibe coding is not bad. Shipping without checking is. For a personal tool, a prototype or an internal form, it is one of the fastest ways to build. For anything holding other people's data or money, it is a fast way to build a first version that still needs the checklist, and often a developer's review. Our vibe coding for business test ran these checks on three internal tools.
When Not to Vibe Code Alone
Some apps carry legal duties as well as technical risks. For these, use vibe coding to build the prototype, then bring in a developer or a platform that handles the regulated parts.
Payments
Never handle card numbers yourself. Use a payment provider's checkout so card data never touches your app.
Health information
Medical data carries legal rules in most countries. A leak can mean fines, not only embarrassment.
Children's data
Apps used by children have extra rules on what you may collect and how you ask for consent.
Money, identity or regulated work
Banking, IDs, legal or financial advice: get a professional review before launch.
Where Vibe Coding Security Is Heading
AI already writes much of the first draft of software: 84% of developers in Stack Overflow's 2025 survey use or plan to use AI tools. For security, the picture is less settled. Veracode's numbers barely moved between 2025 and 2026, while the tools themselves added safety nets: Lovable runs a security scan on every publish, Replit scans before publishing, Bolt checks database access rules, and Base44 offers row-level and field-level security settings.
The likely future is not "AI writes safe code" but "AI writes code and then checks it", with a person still deciding what is acceptable. That is the same pair our test pointed to.
Tool documentation read 5 October 2026: docs.lovable.dev (Security view), docs.replit.com (Security overview, Secrets), support.bolt.new (Database security), docs.base44.com (Entity security).
Frequently Asked Questions
Is vibe coding safe?
It is safe enough for prototypes and personal tools. For apps that store other people’s data or take payments, it is only as safe as the checks you run before launch: secret keys hidden, each user limited to their own data, database rules on, input checked on the server, and logins that refuse common passwords.
Is vibe coding bad?
No, but shipping without checking is. Vibe coding is a fast way to build a first version. The problems come when that first version goes live with real users’ data and nobody has tested who can see what.
What are the biggest vibe coding security risks?
The most common are secret keys visible in the browser, one user being able to see another user’s data, databases with no access rules, trusting whatever people type, weak logins, unchecked code packages, personal data stored in the wrong place, and code nobody understands.
How do I make a vibe-coded app secure?
Run a pre-launch checklist: hide secret keys, test with two accounts and while logged out, turn on database access rules, check every input on the server, refuse common passwords, and keep personal data out of code uploads. Then ask the AI to review its own app for security problems before it changes anything.
Is there a vibe coding security checklist?
Yes. Ours has 12 checks, including secret keys, per-user data, database rules, input checks, login rules, password change, HTTPS and backups. Each one says how to test it without reading code and when it applies.
Can AI check its own code for security bugs?
Yes, and it is worth asking. In our test the AI’s own review found nine problems, including several our checklist missed. It also missed one we found by testing, and it raised four problems only when asked, so use both.
Is my API key safe if I paste it into a prompt?
Treat a prompt like an email to a stranger. Put keys in the tool’s secrets setting instead, and ask the AI to make sure no key can be seen in the browser.
Is a hosted app builder safer than a vibe coding tool?
It moves some risks to the platform: hosting, logins, password storage and security updates. You still decide what data you collect and who can see it, so the checklist still applies.
Do I need a developer to review a vibe-coded app?
Not for a personal tool or a prototype. For anything handling payments, health information, children’s data or other people’s personal details, a developer’s review before launch is worth the cost.
Is vibe coding the future?
For starting software, it largely already is: 84% of developers use or plan to use AI tools. For security, the best results still come from AI writing the code, AI reviewing it, and a person deciding what is safe enough to launch.
Build the First Version, Then Check It
Describe your app or website in a few sentences, and Appy Pie AI builds a first version through conversation, on a platform that handles hosting and logins for you.
Try AI Vibe CodingCheck Before You Share
Vibe coding builds working apps quickly. Working is not the same as safe. Before anyone else uses your app, run the checklist, test with two accounts, ask the AI to review its own work, and fix what you find. It takes less time than writing the first prompt did.
Try AI Vibe Coding →
