At 11:14 PM, you open an AI prompt window, describe a SaaS dashboard in three paragraphs, click Accept All forty times, and by midnight you have a deployed web app with login, a slick dark-mode UI, and Stripe checkout. It feels like magic.
It is also the exact workflow behind thousands of production apps that shipped on Tuesday and leaked their entire user database by Friday. Vibe coding is the fastest way in software history to prove an idea — and the fastest way to ship unreviewed security debt if you do not know where to stop vibing.

This guide explains what vibe coding actually is, why it exploded, the five real production failures hitting vibe-coded apps today, and the exact five-step protocol to graduate a prototype into real AI-assisted engineering.
(Evaluating the build-vs-buy economics behind this shift? Read When Vibe Coding Beats Per-Seat SaaS for the cost side.)
What Is Vibe Coding (and Why Everyone Suddenly Searches for It)
The term was coined in February 2025 by AI researcher and OpenAI co-founder Andrej Karpathy, who described a new way of building software where you “fully give in to the vibes, embrace exponentials, and forget that the code even exists.” By the end of the year, Collins Dictionary had named it Word of the Year.
Unlike traditional autocomplete, vibe coding flips the human’s role from syntax writer to product director:
- Prompt: Describe the desired feature or UI in plain English.
- Accept All: Let the agent edit five files and install three packages without inspecting the diff.
- Run & Paste Errors: Click around the app; if something crashes, copy the stack trace back into the chat.
- Repeat: Keep steering by “vibes” until the happy path looks right.
That loop is astonishingly effective for validation. When you only care whether a landing page, internal script, or weekend MVP solves a problem, reading every line of boilerplate slows you down for zero gain.
Real Example: Vibe Prompt vs. Engineering Prompt
Notice how a single prompt changes what the AI builds:
- Vibe Coding Prompt: “Build me a SaaS dashboard with Supabase login, user profiles, credits, and Stripe billing.” -> The AI optimizes for speed: it often leaves RLS permissive, puts
RequireAuthonly in React, and skips webhook signature checks. - AI-Assisted Engineering Prompt: “Create a
profilesmigration with RLS enabled where users canSELECTtheir own row, but only a server-side Edge Function usingservice_rolecan modifycreditsorplan_tier. Add an integration test verifying unauthorizedPATCHrequests return403.” -> Same AI speed, completely different security posture.
Vibe Coding vs. AI-Assisted Engineering
The mistake teams make is confusing vibe coding with AI-assisted engineering. Both use the exact same models and editors — the difference is who owns the invariants.

| Dimension | Vibe Coding | AI-Assisted Engineering |
|---|---|---|
| Primary Goal | Working demo in minutes | Maintainable, secure system in production |
| Human Role | Product director (“make the button blue”) | Architect & reviewer (“enforce idempotency and RLS”) |
| Code Ownership | Black box (“forget the code exists”) | Full ownership of boundaries, schema, and state |
| Verification | Visual click-testing on the happy path | Unit/integration tests, type checks, static analysis |
| Security Posture | Implicit trust in AI defaults | Explicit threat model on auth, billing, and data |
| Blast Radius | Acceptable for throwaway prototypes | Controlled for multi-user SaaS & enterprise apps |
Vibe coding is not bad engineering — it is pre-engineering. The failure happens only when a throwaway prototype quietly becomes your production backend without ever passing an engineering gate.
For a deeper look at how terminal and IDE agents compare in structured engineering workflows, see Claude Code Modes Compared and AI Coding Agents Compared.
The 5 Real Ways Vibe-Coded Apps Break in Production
Security reports (such as Veracode’s GenAI analyses) consistently find that roughly 45% of AI-generated code snippets introduce OWASP Top 10 flaws. When nobody reads the diff, five specific failure modes show up over and over again.

1. Missing or Naive Database Row-Level Security (CVE-2025-48757)
Full-stack prompt generators love Supabase because it turns a Postgres database into an instant REST API. The catch: if Row-Level Security (RLS) is disabled, anyone with your public anon key (which lives in frontend JavaScript by design) can read or overwrite every row in the database.
That exact pattern triggered CVE-2025-48757, exposing thousands of vibe-coded apps. Even worse is the “naive RLS patch”: when a builder pastes the warning back into the AI, the model generates a policy like this:
-- DANGEROUS: AI-generated "fix" that lets users edit their own role or creditsCREATE POLICY "Users can update own profile"ON public.profilesFOR UPDATEUSING (auth.uid() = id)WITH CHECK (auth.uid() = id);This looks secure in a demo. In reality, if profiles contains columns like is_admin, plan_tier, or credits, any attacker can send a PATCH request from curl and upgrade themselves to admin for free.
2. Slopsquatting (Hallucinated Package Attacks)
LLMs occasionally hallucinate package names that sound plausible — for example, supabase-rls-helper or stripe-webhook-verifier-node. Attackers track recurring LLM hallucinations and register those exact names on npm and PyPI with malicious install scripts.
If your AI agent runs npm install inside an autonomous loop — or you blindly approve package.json changes — you pull a live backdoor into your build. (See Defending Against npm Supply-Chain Attacks for lockfile and registry hardening.)
3. Client-Side-Only Auth Guards (<RequireAuth>)
Ask an AI to “make /admin only accessible to admins” and it often wraps the React page in a <RequireAuth> component that redirects non-admins to /login. Visually, it works. Meanwhile, the underlying /api/admin/users endpoint checks nothing at all — any script hitting the API directly bypasses the UI completely.
4. Unsigned Payment Webhooks
When wiring Stripe or Lemon Squeezy, AI assistants frequently create a /api/webhook route that parses req.body.type === "checkout.session.completed" and unlocks paid features without verifying the cryptographic webhook signature. Anyone who discovers the endpoint URL can forge a JSON payload and grant themselves a lifetime subscription.
5. Leaked Service Keys & Hardcoded Secrets
Automated scans of public vibe-coded repositories routinely uncover SUPABASE_SERVICE_ROLE_KEY (which bypasses all RLS), OpenAI API keys, or Stripe secret keys pasted into NEXT_PUBLIC_* / VITE_* variables — shipping root credentials straight to every visitor’s browser.
The Vibe Coding Tool Spectrum
Not all vibe coding tools operate at the same altitude. Knowing where each tool sits helps you pick the right one for the stage you are in:

- Browser App Generators (
Lovable,Bolt,v0): Best for zero-setup UI prototypes, stakeholder demos, and validating whether anyone cares about your product. Highest risk if deployed straight to production without exporting and auditing the repo. - Agentic IDEs (
Cursor,Windsurf): The sweet spot for hybrid work — fast multi-file generation inside a real editor where you can inspect diffs, run local tests, and keep control of architecture. - Terminal & Repo Agents (
Claude Code,Codex,OpenCode): Built for AI-assisted engineering inside existing production repositories with CI, linters, migration gates, and strict test suites.
The 5-Step Protocol: How to Graduate a Vibe Prototype to Production
You do not have to give up the speed of vibe coding to stay safe. Just enforce a hard handoff gate the moment real users, real data, or payments enter the picture:
- Freeze “Accept All” on four sensitive zones: Auth middleware, database migrations/RLS policies, billing webhooks, and IAM/environment variables always require line-by-line human review.
- Audit database access with a hostile mindset: Verify RLS is enabled on every table, restrict sensitive columns (
role,credits,subscription_status) to server-side functions or triggers, and confirm zeroservice_rolekeys exist in client bundles. - Verify every dependency in
package.json/requirements.txt: Confirm every new package is real, actively maintained, and pinned in your lockfile before running CI/CD. - Lock behavior with automated tests: Have the AI write integration tests for auth boundaries, webhook signature rejection, and critical business invariants — and never let the agent weaken a failing test just to make it pass.
- Refactor into clear boundaries: Collapse duplicated 800-line AI components into explicit API contracts, typed schemas, and modular services so humans (and future AI sessions) can reason about changes without breaking unrelated features.
The Bottom Line
Vibe coding is a superpower for discovery: it compresses weeks of boilerplate into an afternoon. AI-assisted engineering is what turns that discovery into a real business that does not implode under its first security scan.
Use vibes to find out what to build. Use engineering to decide how it survives production.





