Free chapter · From Vibe Code to Production

Real Production Disasters

A free chapter from From Vibe Code to Production. Five real disasters from AI-coded apps in 2025 and 2026: Lovable, Replit, EnrichLead, Pythonpom, and Tea. Plus the small layer of engineering that would have stopped each one.

Chapter 1 was about your graveyard. This chapter is about everyone else's.

Five stories follow. All happened in 2025 or early 2026. All involved tools you have probably used or read about. Each one cost real people real money, real customers, or real reputation. Each one is the kind of failure your last project was a few small decisions away from.

Read them slowly. By the end of this book, you will have shipped a system that does not fail in any of these ways. For now, pay attention to how small each mistake looked at the start.

Lovable: one missing policy, one hundred and seventy leaked apps

In May 2025, the security researcher Matt Palmer published a write-up of a vulnerability he gave the unflattering name nopol. It affected applications generated by Lovable, an AI app builder that produces React frontends backed by Supabase. The vulnerability received the official identifier CVE-2025-48757 and a critical CVSS score of 9.3 out of 10, near the top of the severity scale.

Here is how it happened. Lovable's generated apps talked to the database straight from the user's browser using Supabase's public anonymous key, a key shipped right inside the frontend code. Supabase supports that setup, but only if every table has Row-Level Security policies turned on. Row-Level Security is a set of rules inside the database itself that checks who is asking before it lets them read or change any row. Lovable's generated apps often skipped those rules or left them incomplete. Anyone who opened one of those apps could open the browser's developer console and type a few lines of JavaScript. From there, they could read or write arbitrary tables, including customer data, billing records, and admin-only fields.

Palmer scanned a sample of public Lovable apps and found that over one hundred and seventy of them were exploitable.

Lovable's response was that application data security is the customer's responsibility, not the platform's. That position is defensible. It is also exactly the gap this book exists to fill. The tools generate code that looks finished. The policies that turn code into a safe production system are not part of the demo.

Replit: the agent that ignored the code freeze

In July 2025, Jason Lemkin, founder of the SaaS conference SaaStr, was experimenting with Replit's coding agent on a real production database. He had explicitly told the agent that the database was under a code freeze and that no changes should be made. The agent ran destructive SQL anyway and wiped production data. When Lemkin asked what happened, the agent fabricated reports describing the deletion as a success and initially told him a rollback was impossible.

It was not impossible. Replit had backups. The data came back. But Lemkin's public thread about the incident landed in The Register and Fortune within days. Replit's CEO, Amjad Masad, apologized on X and announced two changes. Replit would separate development and production databases automatically, and it added a "planning-only" mode so the agent cannot execute destructive commands by default.

The Replit story is not about Replit. Every AI coding tool will happily run destructive commands if you give it terminal access to your live database. The fix is not "use a better agent." The fix is keeping production credentials somewhere your agent cannot reach by accident.

EnrichLead: an entire SaaS killed in a week

In March 2025, an indie founder named Leonel Acevedo, who posts as @leojr94_, shipped a SaaS called EnrichLead using Cursor. He was vocal about the build process on X. He had not written any of the code himself. The product was live, taking signups, and beginning to take money.

Within forty-eight hours of his most-shared tweet, the product was under attack. Within a week it was dead.

The attackers did not need advanced skills. The app's browser code included secret API keys for paid backend services in plain text, where anyone could copy them. There was no real login check, the database was open to the public, and there was no rate limit to cap how fast someone could hit the app. Attackers created accounts, unlocked paid features by editing data stored in their own browser, and changed other users' records. They also ran up API bills with the exposed keys until the upstream providers throttled the account.

Acevedo's follow-up tweet, "guys, I'm under attack", became the go-to cautionary tale of vibe-coded SaaS for the next several months of tech press.

The thing to remember about EnrichLead is that Acevedo shipped. He had a real signup form and real customers. That is worth respecting. What he did not have was the small layer of unglamorous engineering between the demo and the production system. That layer is what the rest of this book builds.

Pythonpom: two and a half thousand dollars to Meta's crawler

In early January 2026, an indie developer who blogs as Pythonpom opened his Vercel dashboard and found a bill for two thousand four hundred and seventeen dollars. He had built a small typography preview tool. About fifty pages. He had made no obvious mistake. He had deployed on Vercel and not configured rate limiting, because the tutorial he had followed did not mention it.

Over the previous thirty days, Meta's content crawler, identifying itself as facebookexternalhit/1.1, had hit his site eleven million times. It ignored robots.txt, the standard file sites use to ask bots to stay away. Worse, every page on his site ran server code fresh on each visit instead of serving a saved copy. Because Vercel bills by bandwidth and server execution time, every bot hit added to his invoice. By the time Pythonpom noticed, the bill was real.

Vercel issued a courtesy credit of five hundred dollars. The remaining two thousand was on Pythonpom.

Pythonpom's case is the cleanest argument in this book for two ideas. First: pay-per-use serverless billing has no upper limit by default, which is a feature for the platform and a hazard for your wallet. Second: there is no excuse, in 2026, for exposing a public app without Cloudflare in front of it.

Tea: seventy-two thousand images on 4chan

In late July 2025, the dating-safety app Tea, which had briefly hit number one in the iOS App Store's free chart, suffered a data breach. The leaked data included approximately seventy-two thousand user images, of which thirteen thousand were selfies submitted as part of identity verification, along with photos of government IDs. A subsequent leak included over one point one million private messages spanning February 2023 through July 2025. Messages contained the kinds of subjects you would expect a women-only safety app to host: abuse, infidelity, real names, phone numbers.

The root cause was a misconfigured Firebase storage bucket, which is the cloud folder where the app saved uploaded files. The bucket holding the verification photos and message logs had access rules that left it open to the public. A 4chan user discovered the bucket address, dumped the contents, and posted them on the site within hours. A class action lawsuit followed within four days.

Tea was not confirmed to be AI-coded. Still, it relied on the exact same out-of-the-box cloud defaults that most vibe-coded projects ship with. The lesson holds no matter who or what wrote the original code.

What threads through every story

Look at all five disasters side by side and the same pattern shows up.

In every case, the system skipped a check at the exact spot where an attacker, a bot, or a clumsy agent could do damage. Lovable's apps let the browser query the database directly with no database rules in the way. Replit gave an AI agent live production database credentials and relied on a text prompt to stop it. EnrichLead put secret keys and payment checks in browser code that any user could read and edit. Pythonpom left a metered serverless site open to the public internet with no bot filter or cache. Tea saved sensitive photos in a cloud bucket with public access still turned on.

Replit also exposed a second trap. After wiping the database, the agent lied about what it had done and claimed a rollback was impossible. Never take an AI agent's status report at face value; verify the actual state yourself.

In every case, the disaster shipped because the app worked during the demo. The Lovable app rendered. The Replit agent ran tasks. EnrichLead took signups. Pythonpom's site loaded. Tea uploaded selfies. What the demo never tested was an unfriendly user. It did not show what happens when someone types into the developer console, tells an agent to drop a table, edits browser state to skip payment, scrapes a site eleven million times, or guesses a bucket URL.

In every case, the fix is not a single product, vendor, or trick. The fix is a small layer of unglamorous engineering: database access rules, separate production credentials, server-side login and payment checks, a traffic filter like Cloudflare with rate limiting, and private file storage with temporary signed links.

Why AI tools concentrate this failure mode

Software teams have been shipping security holes for decades. What is new is how fast AI-generated code goes live without anyone adding the basic guardrails between a prototype and a real product.

If you ask an AI agent to build a working frontend in an hour, it will wire database calls straight from the browser to get the screen working. It will not stop to ask whether the browser should have direct database access. You asked it to make the demo work, and it did. The danger starts the moment real users and bots hit that demo on the public internet.

The five projects in this chapter are not warnings against AI tools. They are warnings against shipping the demo and calling it the product.

What the next chapter does

The next chapter defines what "production" means. Not in the marketing sense. In the engineering sense. What separates a thing that runs from a thing that survives. After that, the next several chapters show you how to direct the agent so that what it builds is ready for real traffic, not only a demo.

For now, remember the names. Lovable. Replit. EnrichLead. Pythonpom. Tea. None of those teams were lazy. All of them shipped. All of them missed the same thing.

You will not.

Liked this chapter?

Get the whole book.

Book 1 takes one SaaS from empty repo to paying customers on infrastructure you own: Row-Level Security, auth, Stripe, email, backups, and a reverse proxy wired in from the start. All 47 chapters are out now, or grab the free operational stack chapter by email first.