Building for Exit

What Happens When Your Vibe-Coded App Leaks Customer Data

The most common thing an AI-built app gets wrong is not a feature, it is security. Exposed keys and broken permissions stay invisible until a customer finds them for you.

Code on a computer screen
Photograph: Sai Kiran Anagani _imkiran · Wikimedia Commons · CC0

The most common thing a vibe-coded app gets wrong isn’t a feature. It’s security. API keys shipped straight into the browser. Permissions that let any logged-in user read every other user’s records. No backups behind the database. Most founders learn this the day a customer finds it instead of them.

This isn’t a reason to feel foolish for building with AI. It’s a predictable gap. The tools are tuned to produce something that works in a demo, not something that holds up when a stranger is actively trying to break it.

What AI-generated code quietly skips

A prototype optimizes for the happy path. The things it leaves out are the exact things that matter once money and real accounts are involved: a secret key sitting in the client bundle where anyone can read it, authorization checks missing so the server trusts whatever the browser asks for, no rate limiting, no backups, logs quietly storing personal data in plain text.

The industry keeps a standard catalogue of how apps get breached, the OWASP Top 10. Broken access control sits at the very top of the 2021 list, with more than 318,000 occurrences in OWASP’s testing, more than any other category. That’s the category a prompt-built app falls into most often, because “only show a user their own data” is a rule the demo never had to enforce.

Why a non-technical founder can’t see it coming

The app looks completely fine. It loads, it logs you in, it shows the right screen. Nothing on the working surface tells you the lock on the door is painted on.

That’s the trap. The failures stay invisible right up until they’re catastrophic. You don’t know what you don’t know, and the AI didn’t flag it, because you didn’t know to ask and it wasn’t built to volunteer.

This isn’t a beginner problem, either. A Stanford study, “Do Users Write More Insecure Code with AI Assistants?”, found that people using an AI coding assistant wrote less secure code than those without one, and were more likely to believe their code was secure. A senior engineer opens the same app and sees the open doors right away.

What a leak actually costs a B2B startup

IBM put the average cost of a data breach at $4.88 million in 2024, a record high. In a consumer app, a breach is a bad week. In B2B, it’s often the end of the account. The customer who trusted you with their data, and their own customers’ data, won’t renew, won’t give you the reference, and may have a contractual and legal claim. One incident can undo a year of selling.

The buyers most worth having are the ones who’ll ask the hardest questions before they sign. A single honest “we’re not sure” can lose the deal.

Fixing it before launch, not after

The work is clear, and it isn’t endless. Move secrets to the server. Enforce authorization on every request. Add rate limiting and backups. Stop logging what you shouldn’t. Get the whole thing reviewed before real customers depend on it.

These fixes work, and the numbers back it. Verizon’s 2024 Data Breach Investigations Report shows basic web application attacks, the simple category a prompt-built app falls into, dropping from a quarter of all breaches the prior year to just over 8 percent, and 77 percent of what’s left runs on stolen credentials. The common gaps are the well-understood ones, and standard controls close them. For a senior team, this is table stakes, done once and done properly.

If you’ve got a validated product sitting on fragile foundations, hardening it is the first thing a serious partner does. That’s where a co-build partnership starts.

Security as a foundation, not a bolt-on, is how Clearview has built for over fifteen years. Our senior teams close these gaps as routine work, and in a co-build we own that work alongside you.

Sources