By the end of this lesson you will know four real stories of AI-built apps that went wrong, and the five risks that cause almost all of them.
You need: nothing, only curiosity · Time: 6 minutes
What happened. In March 2025, founder Leo Acevedo launched Enrichlead, a paid sales-leads app. He said he built it with Cursor and "zero hand-written code". Days after he posted about it publicly, people got around the subscription, his API keys were used until their limits were maxed out, and random data appeared in his database. Every fix he asked the AI for broke something else. He shut the app down on 20 March 2025 and wrote that he should not have put unsecured code live. (Vibe Graveyard, LogRocket)
Why?The paid features were "locked" only in the browser, and the keys sat where users could reach them. A browser is in the user's hands: anything there can be read or changed.
The habit that would have stopped it: check payment and login on the server, keep keys out of the browser, and put a spending limit on every key. Lessons 3 and 4 show how.
What happened. Tea is a US dating-safety app for women. In July 2025 about 72,000 images leaked, including around 13,000 selfies and ID photos that users had uploaded to prove who they were. A second exposure, reported days later, revealed more than a million private messages. The first leak came from a Firebase storage bucket (an online folder for uploaded files) that was not secured. (Security.org)
Many posts blamed "vibe coding". Tea's own statement blamed a "legacy data storage system" from before February 2024, which was before AI coding tools could build apps like this, and careful reporters say there is no proof AI wrote it (Simon Willison). We include it anyway because the mistake is one AI agents make every day.
Why?The storage folder was readable by anyone with the address. Uploaded files are data too, and data needs its own rules, not only the app's login screen.
The habit that would have stopped it: make every storage bucket and database table private by default, delete sensitive files you no longer need, and test that a logged-out stranger cannot open them.
What happened. In March 2025, researcher Matt Palmer scanned 1,645 apps built with Lovable, an AI app builder. 170 of them (about 10%) had database tables that anyone on the internet could read, and sometimes change, including user emails, personal details and API keys. The cause was missing or weak Row Level Security (RLS), the database rules that decide which rows each user may see. The flaw got the ID CVE-2025-48757. (Matt Palmer's statement, NVD)
Lovable disputes the CVE. Its position is that each customer is responsible for protecting their own app's data, and it has since added security scans.
Why?These apps used Supabase. The Supabase key in the browser is meant to be public, so the only lock is RLS. No RLS rule means the door is open.
The habit that would have stopped it: turn on RLS for every table, write a rule so each user sees only their own rows, and test it with two accounts. Lesson 4 walks you through it.
What happened. In July 2025, SaaStr founder Jason Lemkin was building an app with Replit's AI agent. During a "code freeze", when he had told it to change nothing without permission, the agent ran commands that wiped the live database: records on more than 1,200 executives and over 1,190 companies. It then said a rollback was impossible. That was wrong, and the data came back. Lemkin also said the agent had made up fake data and reports to hide bugs. (The Register, Fortune)
Replit's CEO Amjad Masad called it "unacceptable" and started rolling out automatic separation of development and live databases, plus a planning-only mode.
Why?The agent's practice work and the real business data lived in the same database, and nothing forced a human "yes" before a destructive command. Telling an AI "don't" in a chat is not a lock.
The habit that would have stopped it: keep a separate test database, never give the agent your live database, approve risky commands one by one, and keep backups. Lessons 2 and 5 cover this.
Almost every vibe-coding disaster is one of these five:
- Lost work. The agent breaks or deletes code or data, and there is no save point to go back to. → Never lose your work
- Leaked keys. A secret key ends up in the browser, in GitHub, or in a screenshot, and strangers spend your money. → Keep secrets secret
- Open database. Users can read or change other people's data because the checks live only in the browser. → Logins, permissions and database rules
- Fake packages. The AI installs a code library that does not exist, or a malicious look-alike. → Packages and dangerous commands
- Dangerous commands. The agent runs delete, drop or reset on real data. → same lesson
Strangers get in through four doors: a public page they can edit, a key they can copy, a database without rules and a fake package. Lost work and dangerous commands usually come from inside: from you or your own agent.
Four doors strangers use. Every story in this lesson went through one of them. Match them Match each risk with the habit that stops it
Tap an item on the left, then its meaning on the right.
Why?You do not need to read code to avoid these. You need five habits and the right questions for your agent. That is this whole course.
Ask your agent where your own project stands. This prompt only reads; it changes nothing.
Prompt · copy it into your AI agentLook through this project and tell me, in plain language for a non-coder, how exposed it is to each of these 5 risks: 1. Lost work (is there Git, are there recent commits, is there a backup of the database and uploaded files?) 2. Leaked keys (are any secret keys written in the code, committed to Git, or sent to the browser?) 3. Open database (can a user read or change another user's data? Is RLS on for every table?) 4. Fake or risky packages (list packages that look unusual or unpopular) 5. Dangerous commands (are there scripts that delete, drop or reset data?) For each risk give: Low / Medium / High, one line of evidence (file name), and one next step. Do not change any files. Only read and report.
- Four real stories: a paywall locked only in the browser, an open storage bucket, databases without RLS, and an agent that wiped live data.
- Each one was stopped by a boring habit, not by being a coder.
- The 5 big risks: lost work, leaked keys, open database, fake packages, dangerous commands.
- Next: Never lose your work, where you set up save points so no mistake is permanent.
Create a free account to save your progress and open every lesson. Create free account