Vibe Coding Horror Stories: The Safeguard Nobody Owned

Vibe Coding Horror Stories: The Safeguard Nobody Owned
About two years ago I built an app on Lovable. I knew what I was doing, and I set strict security rules. Within about two days of testing, while the app was already public, I found that its Supabase tables were readable by anyone on the internet.
No real prospect data was ever exposed, which is why mine isn't one of the vibe coding horror stories below. The flaw was the class later published as CVE-2025-48757: tables without adequate row-level security, which Matt Palmer and a colleague found in 170 of 1,645 Lovable projects they scanned [R6]. I'm not claiming my app was in their scan. Same class of flaw.
Read the post-mortems and almost every one ends with the same admission: a safeguard nobody owned. Each failure has one boring control that would have stopped it. My case adds a twist: even a careful builder's rules can look right and protect nothing, and the platform itself can fail too. Owning production means testing, not trusting.
Vibe coding is building software by prompting an AI tool and shipping what it produces without reading the code. In Andrej Karpathy's words, quoted by Simon Willison, it's the mode "where you fully give in to the vibes, embrace exponentials, and forget that the code even exists" [R1].
Disclosure: yousource publishes this and sells Dev On Demand.
Key takeaways
- In a scan of 1,645 Lovable projects, 170 (about 10.3%) had endpoints with inadequate row-level security [R6].
- Replit's agent deleted SaaStr's production database during a code freeze [R2].
- A three-person startup was billed $82,314.44 in about 48 hours on a leaked Gemini API key, against a usual ~$180 a month [R23].
- Platform bugs, such as Base44's unauthenticated sign-up endpoints, left private apps open to anyone, however each builder had configured them [R13].
What is vibe coding, and when is it safe?
Vibe coding is safe when the stakes are low: Simon Willison says it's fine when "Projects should be low stakes" [R1]. His rule for anything that matters: "I won't commit any code to my repository if I couldn't explain exactly what it does to somebody else" [R1].
Mine was a trial, a lead-capture website, so the stakes were low. I still wrote strict rules, but they didn't cover the part that mattered: row-level security on the tables was missing or too weak. Palmer makes the point: Lovable's security scanner "merely checks for the existence of any RLS policy, not its correctness" [R7]. A policy can exist and still protect nothing. The gap between the rules you think you set and what the database enforces is where most vibe coding security risks live.
The pattern in vibe coding horror stories: a safeguard nobody owned
Skip the headlines; read the confessions.
- Jason Lemkin, after Replit's agent deleted his production database: "They are tools. Not dev teams. Remind yourself of that every single day." [R3]
- Alexey Grigorev, after Claude Code wiped DataTalks.Club's infrastructure: "This incident was my fault: I over-relied on the AI agent to run Terraform commands." [R11]
- Amazon, on an outage reportedly tied to its Kiro agent (Amazon says it wasn't the AI): "This brief event was the result of user (AWS employee) error - specifically misconfigured access controls - not AI." [R12]
- Lovable's CISO, Igor Andriushchenko, on an exam app full of holes: acting on the platform's scan recommendations is "at the discretion of the user." [R19]
Four parties, one shape: something went wrong around an AI tool, and the control that should have caught it sat on nobody's list. That's not a character flaw, and publishing the post-mortem is how others learn.
Horror 1: open databases and keys in the browser
The most common failure is the quietest: data anyone can read. Palmer's scan turned up 303 vulnerable endpoints across 170 projects, exposing emails, phone numbers, payment details and API keys [R6]. Researchers could even set "payment_status": "paid" and skip Stripe [R6].
Moltbook shipped a Supabase key hardcoded in client JavaScript with no row-level security behind it, giving unauthenticated read and write access to about 4.75 million records, including 1.5 million API tokens and 35,000 emails [R18]. Its founder had posted: "I didn't write a single line of code for @moltbook." [R18]
Later that month, Taimur Khan found 16 vulnerabilities, six of them critical, in an exam app built on Lovable and showcased on its Discover page, holding 18,697 records [R19]. Its auth logic was inverted: it blocked logged-in users and let anonymous ones through [R19].
Escape.tech scanned 5,600+ public vibe-coded apps and found 2,000+ vulnerabilities, 400+ exposed secrets and 175 instances of personal data, including medical records and IBANs [R14]. "Supabase service keys were often trivially retrievable from frontend bundles," it reported [R14]. It was a passive scan, so those numbers are a floor [R14].
The boring control: send a logged-out request to every table and endpoint, before launch and after every change. If data comes back, everyone gets it. Wiz draws the useful line: an exposed publishable key "does not automatically indicate a security failure" [R18]. The failure is that key plus missing row-level security, or a service key in the browser. More in how to test AI-generated code.
Horror 2: the AI agent deleted the production database
"AI agent deleted database" is the vibe coding fail that makes the news. Our earlier post on vibe-coded MVPs covers Replit: its agent deleted SaaStr's production database during a code freeze, despite "eleven separate warnings in ALL CAPS" [R2]. Replit then shipped separate dev and prod databases [R4].
DataTalks.Club is sharper. In February 2026, Claude Code ran terraform destroy against an archived state file and wiped the production database, network, load balancers and automated snapshots, about 2.5 years of course submissions [R11]. AWS support found a hidden snapshot and restored it about 24 hours later [R11]. Grigorev's fixes: the agent no longer runs commands, deletion protection, a daily restore test and remote state [R11].
Google's Antigravity, in "Turbo" mode with no approval step, ran a command it said was meant to clear a project cache and instead wiped the root of a user's D: drive: "No, you absolutely did not give me permission to do that… I am deeply, deeply sorry." [R10] Gemini CLI reportedly misread a failed directory-creation command, and its moves overwrote all but one file [R9].
Per FT sources, Amazon's Kiro chose to "delete and recreate the environment", causing a 13-hour AWS Cost Explorer disruption in one China region [R12]. Amazon blames access controls and added "mandatory peer review for production access" [R12]. Either way, the fix is access, not the model.
The boring control: a hard split between dev and production, no production credentials for any agent, and a restore you've actually tested. DataTalks.Club got lucky with a snapshot the destroy missed [R11]. Don't plan on that.
Horror 3: a leaked key is someone else's bill
A three-person startup in Mexico was charged $82,314.44 for Gemini usage in about 48 hours, on 11 and 12 February 2026, against a usual bill of about $180 a month [R23]. Nobody has shown that app was vibe-coded; it's here for what a leaked key costs.
Truffle Security found 2,863 live Google API keys on public web pages that could call Gemini, because Google API keys meant to be public, like those for Maps and Firebase, gained Gemini access once it was enabled [R22]. Google first called it "Intended Behavior", then reclassified it as a bug [R22].
EnrichLead is the vibe-coded version, reported second-hand: founder Leo Acevedo reportedly built it with "Zero hand-written code" in Cursor, then saw API keys maxed out and the paywall bypassed [R29]. He shut it down on 20 March 2025: "you guys were right, I shouldn't have deployed unsecured code to production." [R29]
The boring control: scope every key to the one API it needs, keep secret keys on the server, and set spending caps. A cap turns an $82,000 surprise into an outage you can fix. See keeping development and production secrets apart.
Horror 4: crashing on launch day
Sometimes the app works until people arrive. Every built Proof mainly with Codex and GPT-5.4. Over 4,000 documents were created after launch, "but the app had been mysteriously crashing all day" [R24]. Every names the trap: "Coding models often prefer to fix the local issue instead of stepping back first to identify the root cause." [R24]
Arguably, this is the least documented vibe coding fail, because most apps never get big enough for a post-mortem. They just fall over.
The boring control: load-test before launch, have monitoring in place before the traffic, and make one person own the root cause, not the symptoms. Start with what to monitor in production.
Horror 5: floors on shaky foundations
The slowest horror is the codebase itself. Cursor's CEO, Michael Truell, describes vibe coding as building "shaky foundations as you add another floor, and another floor" until "things start to kind of crumble" [R26]. GitClear, a vendor with a commercial stake in the answer, reports copy-pasted code rising from 9.4% to 15.7% of changes [R25]. Veracode found AI introduced vulnerabilities in 45% of its test tasks [R15].
Then there are packages that don't exist. A USENIX Security 2025 study of 16 models found hallucinated package names in at least 5.2% of commercial-model samples and 21.7% of open-source ones [R16]. Aikido's Charlie Eriksen claimed one LLM-invented npm name, react-codeshift, already referenced by 237+ GitHub repos: "If I hadn't claimed it first, an attacker could have." [R17]
The boring control: nobody merges a diff they couldn't explain, and every new dependency gets checked for its publisher before install. That's Willison's rule [R1], applied to packages too.
When the platform itself leaks
Some holes aren't yours to close. In July 2025, Wiz found unauthenticated register and verify-OTP endpoints in Base44: anyone with an app's non-secret app_id could join private apps, bypassing SSO [R13]. It was fixed in under 24 hours, with no evidence of exploitation [R13].
In April 2026, a researcher showed that an ordinary Lovable account could read other users' source code, database credentials and AI chats [R20]. Lovable first called it "intentional behavior", then admitted that "in February… we accidentally re-enabled access to chats on public projects." [R20]
You can't configure your way out of a platform bug. Set that beside my story: my rules looked right and protected nothing, and these builders' settings didn't matter at all. I only caught my gap because I tested it. So watch your platform: follow its security disclosures, and rerun your logged-out test whenever it changes something underneath you.
Less vibe, more process
I still think vibe coding is great, if you're technically proficient and follow a structured process. The AI agent does the job a lot quicker than a developer. What it skips is the work before coding: requirements, a data model, access rules, separate environments, backups.
So: less vibe, more structured process. Here's the hardening list:
| Failure class | The boring control |
|---|---|
| Open database, keys in the browser | Logged-out request against every table and endpoint; service keys only on the server |
| Agent with production keys | Separate dev and prod; no production credentials for agents; tested restores |
| Leaked key, runaway bill | Keys scoped to one API; spending caps |
| Crash on launch day | Load test and monitoring before launch; one owner for root cause |
| Shaky foundations | No unexplained diffs; check every new package before install |
Rather not work through it yourself? Hand it over as tasks to Dev On Demand. Either way, run the first row this week: open a private browser window, send a logged-out request to your app's database, and see what comes back.
Frequently asked questions
What are the biggest vibe coding security risks?
Database tables anyone can read and secret keys shipped to the browser. Escape.tech's scan of 5,600+ public vibe-coded apps found more than 2,000 vulnerabilities and 400+ exposed secrets [R14], and about 10.3% of 1,645 scanned Lovable projects had inadequate row-level security [R6].
Can an AI agent really delete a production database?
Yes. Replit's agent deleted SaaStr's production database [R2], and Claude Code ran terraform destroy that wiped DataTalks.Club's production database and its automated snapshots [R11]. Both happened because the agent could reach production.
Is vibe coding safe for a real business app?
Only with the controls a real business app needs. Simon Willison says vibe coding is fine when "Projects should be low stakes" [R1]. For anything holding customer data, test access rules from outside, keep agents away from production and cap your API spend.
What should a CTO check first in an inherited vibe-coded app?
Send logged-out requests to every table and endpoint, and search the frontend bundle for service keys, which Escape.tech found "often trivially retrievable" [R14]. Then confirm dev and production are separate and that a restore has actually been tested [R2, R11].
Sources
- [R1] Simon Willison, 19 Mar 2025: Karpathy's definition of vibe coding ("forget that the code even exists"); "Projects should be low stakes"; "I won't commit any code to my repository if I couldn't explain exactly what it does to somebody else." — https://simonwillison.net/
2025/ Mar/ 19/ vibe-coding/ - [R2] SaaStr, Jul–Aug 2025: Replit's agent deleted the production database (1,206 executive records, 1,196+ company profiles) after ~9 days; "eleven separate warnings in ALL CAPS"; "falsely claimed recovery was impossible"; preview and dev the "same single database". — https://www.saastr.com/
replits-new-release-address-most-of-the-challenges-we-hit-vibe-coding-but-is-prosumer-vibe-coding-really-ready-for-commercial-apps-yet - [R3] The Register, 22 Jul 2025: Replit response ("Unacceptable and should never be possible"); Lemkin: "They are tools. Not dev teams. Remind yourself of that every single day." — https://www.theregister.com/
2025/ 07/ 22/ replit_saastr_response/ - [R4] Replit blog, 21 Jul 2025: separate dev and prod databases; agent asks before applying dev changes to prod. — https://replit.com/
blog/ introducing-a-safer-way-to-vibe-code-with-replit-databases - [R6] Matt Palmer (with co-researcher Kody Low), statement on CVE-2025-48757, 29 May 2025: found 20 Mar, reported 21 Mar 2025; 1,645 Lovable projects scanned, 303 vulnerable endpoints in 170 projects (~10.3%); emails, phone numbers, payment details, API keys exposed; "payment_status": "paid" bypass. — https://mattpalmer.io/
posts/ statement-on-CVE-2025-48757/ - [R7] Matt Palmer: Lovable's scanner "merely checks for the existence of any RLS policy, not its correctness"; Lovable initially denied. — https://mattpalmer.io/
posts/ statement-on-CVE-2025-48757/ - [R9] AI Incident Database #1178: Gemini allegedly misread a failed directory-creation command; moves overwrote all but one file. — https://incidentdatabase.ai/
cite/ 1178 - [R10] The Register, 1 Dec 2025: Google Antigravity in "Turbo" mode ran a command it said was meant to clear the project cache and wiped the root of a user's D: drive; "No, you absolutely did not give me permission to do that… I am deeply, deeply sorry." — https://www.theregister.com/
2025/ 12/ 01/ google_antigravity_wipes_d_drive/ - [R11] Alexey Grigorev, 6 Mar 2026: Claude Code ran terraform destroy on DataTalks.Club; production RDS, VPC, ECS, load balancers and automated snapshots wiped; AWS restored a hidden snapshot ~24h later; "This incident was my fault: I over-relied on the AI agent to run Terraform commands."; fixes incl. agent no longer executes commands. — https://aishippingblog.com/
p/ how-i-dropped-our-production-database - [R12] The Register, 20 Feb 2026: per FT sources Kiro chose to "delete and recreate the environment" (13-hour Cost Explorer disruption, one China region); Amazon: "user (AWS employee) error… not AI"; "mandatory peer review for production access". — https://www.theregister.com/
2026/ 02/ 20/ amazon_denies_kiro_agentic_ai_behind_outage/ - [R13] Wiz, 29 Jul 2025: Base44 unauthenticated register/verify-OTP endpoints; non-secret app_id gave access to private apps, bypassing SSO; fixed in under 24 hours; no evidence of exploitation in the wild. — https://www.wiz.io/
blog/ critical-vulnerability-base44 - [R14] Escape.tech, 29 Oct 2025: 5,600+ public vibe-coded apps; 2,000+ vulnerabilities, 400+ exposed secrets, 175 PII instances; "Supabase service keys were often trivially retrievable from frontend bundles"; passive scan. — https://escape.tech/
blog/ methodology-how-we-discovered-vulnerabilities-apps-built-with-vibe-coding/ - [R15] Veracode, 30 Jul 2025: AI introduced vulnerabilities in 45% of 80 curated coding tasks across 100+ LLMs. — https://www.veracode.com/
press-release/ ai-generated-code-poses-major-security-risks-in-nearly-half-of-all-development-tasks-veracode-research-reveals/ - [R16] Spracklen et al., USENIX Security 2025: 16 LLMs, 576,000 samples; hallucinated packages at least 5.2% (commercial) and 21.7% (open-source). — https://www.usenix.org/
conference/ usenixsecurity25/ presentation/ spracklen - [R17] Aikido, 21 Jan 2026: Charlie Eriksen claimed the LLM-invented npm name react-codeshift on 14 Jan 2026; referenced by 237+ GitHub repos; "If I hadn't claimed it first, an attacker could have." — https://aikido.dev/
blog/ agent-skills-spreading-hallucinated-npx-commands - [R18] Wiz, 2 Feb 2026: Moltbook Supabase key in client JS with no RLS; ~4.75M records incl. 1.5M API tokens, 35,000 emails, 4,060 private DMs; reported 31 Jan, fixed by 1 Feb; founder quote; publishable key "does not automatically indicate a security failure". — https://wiz.io/
blog/ exposed-moltbook-database-reveals-millions-of-api-keys - [R19] The Register, 27 Feb 2026: Taimur Khan found 16 vulnerabilities (6 critical) in an exam app built on Lovable and showcased on its Discover page (database not hosted by Lovable), 18,697 records, inverted auth logic; Lovable CISO: "at the discretion of the user". — https://www.theregister.com/
2026/ 02/ 27/ lovable_app_vulnerabilities - [R20] The Register, 21 Apr 2026: Lovable BOLA reported by @weezerOSINT; "We did not suffer a data breach… That is intentional behavior"; later "in February… we accidentally re-enabled access to chats on public projects." — https://www.theregister.com/
security/ 2026/ 04/ 21/ lovable-denies-data-leak-cites-intentional-behavior/ 5226233 - [R22] Truffle Security, 25 Feb 2026: 2,863 live Google API keys on public pages could call Gemini; Google API keys meant to be public (Maps, Firebase) gained Gemini access; Google "Intended Behavior", reclassified as a bug 2 Dec 2025. — https://trufflesecurity.com/
blog/ google-api-keys-werent-secrets-but-then-gemini-changed-the-rules - [R23] The Register, 3 Mar 2026: three-person Mexican startup charged $82,314.44 in ~48 hours (11–12 Feb) for Gemini vs ~$180/month usual; leaked-key case. — https://www.theregister.com/
2026/ 03/ 03/ gemini_api_key_82314_dollar_charge/ - [R24] Every, 20 Mar 2026: Proof built mainly with Codex/GPT-5.4; 4,000+ documents created since launch, "mysteriously crashing all day"; models "prefer to fix the local issue"; Shipper: "you might not be able to fix it quickly." — https://every.to/
chain-of-thought/ when-your-vibe-coded-app-goes-viral-and-then-goes-down - [R25] GitClear (vendor), 2026: copy/paste rose from 9.4% to 15.7% of changes across 623M changes. — http://www.gitclear.com/
the_ai_code_quality_maintainability_gap - [R26] Fortune, 25 Dec 2025: Cursor CEO Michael Truell on "shaky foundations as you add another floor, and another floor" until "things start to kind of crumble." — https://fortune.com/
2025/ 12/ 25/ cursor-ceo-michael-truell-vibe-coding-warning-generative-ai-assistant/ - [R29] Vibe Graveyard (secondary), 24 Mar 2026: EnrichLead, "Zero hand-written code", keys maxed out, paywall bypassed, shut down 20 Mar 2025 with founder quote. — https://vibegraveyard.ai/
story/ enrichlead-vibe-coded-saas-shutdown/