Vibe Coded App Security Fails in the Same Six Places
Apps made with five different AI tools look nothing alike in code. The holes look much the same. Vibe coded app security breaks in the same six places whichever tool wrote the code, because the tool writes what you asked for, and nobody asks for the parts an attacker checks first.
The tool still matters. Its defaults decide which of those six you're most likely to have, and that tells you where to look first.
Everything below about each tool comes from its own documentation, last checked on 15 October 2026. These tools change monthly, so check the linked page before you rely on a detail.
Why does AI generated code keep failing security tests?
Because the models are trained to produce code that works, and working and safe are different tests. Veracode's 2025 study of more than 100 models found that 45% of AI-written code samples introduced an OWASP Top 10 flaw. Newer and bigger models did no better than older ones.
Veracode's GenAI Code Security Report, published in July 2025, is blunt about it. The models got better at code that runs and were "no better at writing secure code". Security performance "remained flat, regardless of model size or training sophistication."
The OWASP Top 10:2025 shows where that lands. Broken access control is first again, and OWASP says every application in its test data had some form of it. Software supply chain failures are third. Neither takes a clever attacker. They take an app nobody checked.
Six vibe coded app security holes, whichever tool you used
These are the vibe coding security risks that turn up whatever the tool, the model or the prompt.
Secrets in the browser. An API key ends up in code that ships to every visitor. The AI isn't being careless. Putting the key where the code runs is simply the fastest way to make the feature work. Anyone with the browser's developer tools can read it.
Permissions that only live on the page. The app hides the edit button from people who shouldn't have it, and the server accepts the edit from anyone signed in. OWASP's access control page names this exactly: front-end checks that an attacker skips by calling the endpoint directly. Changing one ID in a request is often enough to read another customer's record.
Payment webhooks nobody verifies. Your payment provider tells your app "this customer paid" by calling a webhook. If the app doesn't check the signature, anyone can send that message. Stripe's docs say that without verification "an attacker could send fake webhook events to your endpoint to trigger actions like fulfilling orders, granting account access, or modifying records."
AI features with no cap. Your chat or summary feature calls a model you pay for per use. With no rate limit and no per-user quota, a stranger with a script runs up your bill. OWASP's list for AI apps calls this Unbounded Consumption, including "Denial of Wallet", and its first fix is rate limits and user quotas.
Admin pages anyone can open. The admin page sits at a guessable address and checks that someone is signed in, not that they're an admin. OWASP calls this forced browsing. It's the second hole with a nicer address.
Packages nobody chose. The AI adds dependencies, and sometimes they don't exist. A USENIX Security 2025 study of 16 models found commercial models suggested non-existent packages at least 5.2% of the time and open-source models 21.7%, producing 205,474 unique package names that nobody had published. Anyone can register one of those names and wait for an app to install it.
How Bolt, Cursor, Replit and v0 shape which hole you get
Bolt hosts the app on Bolt Cloud, creates the database and gives you server functions, which Bolt describes as the place for work "such as checking permissions or processing payments". The risk is the AI doing that work in the page instead. If your project has a vite.config file, Vite's docs say any VITE_ variable is "exposed in client-side source code", so no secret belongs in one. Bolt's project security audit is on paid plans and its database check is on every plan. Run both. Our Bolt page covers the rest of Bolt app security.
Cursor works inside your own repository and leaves hosting, the database and deploys to you. That freedom has a cost. Each route gets written in whichever session asked for it, so permission checks drift from one endpoint to the next. Cursor's ignore-file docs say the agent's terminal and MCP tools "cannot block access" to ignored files, so keep live keys out of the working copy entirely. Bugbot reviews pull requests for security issues, which only helps if changes go through pull requests. More on the Cursor page.
Replit keeps keys in an encrypted Secrets pane, with separate production secrets for the published app (Replit secrets). Each app also gets a development and a production database, and Replit says its Agent "is not able to modify the production database" (Replit databases). That protects your data from the AI. It doesn't protect it from your users. The usual Replit app security gap is a route that returns rows without asking whose they are. Its security scanner covers code, packages and, at its highest level, tests against the running app. See the Replit page.
v0 builds a Next.js app, with a preview deployment for each working branch and production updated when you publish (v0 deployments). In Next.js, a variable that starts with NEXT_PUBLIC_ is "inlined into any JavaScript sent to the browser" (Next.js docs). One wrong prefix and the key ships. Preview addresses are a second door: check who can open them and which database they point at. Our v0 page has the detail.
Lovable has its own pattern, because the browser talks to the database directly. That one is covered in whether a Lovable app is secure.
Why the prompt that fixes one hole reopens another
You find the leaked key and ask the AI to move it to the server. It does. To make the feature work again, it also loosens a permission, or adds an endpoint with no check, or rewrites the file that held your one careful rule. The fix is real. So is the new hole.
This has been measured. Shukla, Joshi and Syed had models refine 400 code samples over repeated rounds and found "a 37.6% increase in critical vulnerabilities after just five iterations". Their conclusion: a person has to check between rounds.
The cause is simple. The AI sees the file in front of it and the sentence you typed. It doesn't see the rule another file depends on, and nobody asked it to keep that rule. Every prompt means "make this work". The safety of the whole app was never in the prompt.
The AI fixes the file in front of it. The hole is usually in the file it can't see.
Rules files narrow the drift. Cursor reads project rules from .cursor/rules or an AGENTS.md file at the start of each session, so write your rules there in plain words: every route checks the record belongs to the caller, no key goes in a public variable. It helps. It doesn't replace the check after each change.
It's the same lesson as automating a broken process. The tool works faster than you can review, so the review has to be built into how you ship.
What to check before real users arrive
Six checks, one per hole. Each takes minutes, and none needs you to read code.
Six checks for a vibe coded app
Search the bundle
Open the live site, view the loaded JavaScript and search for key, secret and sk_
Swap the ID
Sign in as one test user and request a record that belongs to another
Fake a payment
Send an unsigned webhook to the payment endpoint and confirm it is refused
Hammer the AI feature
Call it fifty times in a minute, signed out and signed in, and watch what stops you
Guess the admin page
Open the admin address as an ordinary user
Read the package list
Confirm every dependency exists, is maintained and was added on purpose
Search the bundle
Open the live site, view the loaded JavaScript and search for key, secret and sk_
Swap the ID
Sign in as one test user and request a record that belongs to another
Fake a payment
Send an unsigned webhook to the payment endpoint and confirm it is refused
Hammer the AI feature
Call it fifty times in a minute, signed out and signed in, and watch what stops you
Guess the admin page
Open the admin address as an ordinary user
Read the package list
Confirm every dependency exists, is maintained and was added on purpose
If one fails, fix it and run all six again, because the fix may have opened another. The Lovable production checklist puts the wider launch work in order, and most of it applies whichever tool you used.
If you'd rather someone else looked first, the free Exposure Check on our AI-built apps page looks at your live app from outside only and sends a five-minute video of what turned up. If the list of failures is long, rescue or rebuild sets out how to decide what to do with the app.
The tool you picked decides where to look first. It doesn't decide whether to look.
How we help with this
Backend Architecture
Scalable backend systems, API integrations, and resilient architectures built around the messy reality of third-party services.
Learn more
Architecture Audit
A deep review of your system architecture - API integrations, scalability bottlenecks, resilience gaps, and the failure modes that only show up in production.
Learn more
Want to discuss this topic?
If this resonates with where your company is right now, we'd like to hear from you.