Vibe-Coded App Security: What Actually Goes Wrong (and a Checklist You Can Run)
By Bruce Hansen, Off the Rails Software Consulting · Updated · 5 min read
"Vibe coding" — prompting an AI tool until an app appears — is great for demos. It is a rough way to learn whether the app is safe to put real users on. This guide explains what independent research has actually measured, the failure modes that show up again and again, and a practical checklist you can run this week. It is written by a working engineer, not a credentialed security assessor, and it is not a substitute for a formal penetration test when you need one.
What the research says (with sources)
In 2025, Escape.tech published The State of Security of Vibe Coded Apps and a methodology write-up. Across more than 5,600 publicly available applications built with vibe-coding platforms, they reported:
- 2,000+ high-impact vulnerabilities
- 400+ exposed secrets
- 175 instances of exposed PII
Their methodology post is clear about limits: scans were largely passive, the sample is skewed toward discoverable public apps (especially Lovable), and results are a lower bound. Even with those caveats, the pattern is consistent enough to take seriously before you launch.
Separately, Veracode's 2025 GenAI Code Security Report tested AI code generation across many models and found that in 45% of benchmark tasks the model introduced a detectable OWASP Top 10 vulnerability. Syntax got better over time; security performance mostly did not.
None of that means "AI apps can't be safe." It means shipping speed without a review step is where people get hurt.
The failure modes that keep showing up
1. Database rules that don't match the product
Many vibe-coded apps put a rich client in front of Supabase or Firebase. The browser talks to the database with a publishable (anon) key. Row Level Security (RLS) or Firebase Security Rules are the real gate. If RLS is off, or policies are using (true) on sensitive tables, anyone who can call the API can read or write other people's rows.
Supabase's own docs are blunt: tables in exposed schemas need RLS, and secret / service_role keys must stay on the server (API keys, RLS).
A related case study is CVE-2025-48757, which describes insufficient RLS in Lovable-generated projects (the supplier disputes the framing; the failure mode — client-reachable tables without adequate policies — is still what you should check).
2. Secrets that shipped to the browser
Anything in NEXT_PUBLIC_*, VITE_*, EXPO_PUBLIC_*, or hard-coded in a client bundle is public. Service-role keys, Stripe secret keys, OpenAI keys, and webhook signing secrets do not belong there. Escape reported hundreds of exposed secrets in their scan set; you only need one.
3. Auth that looks right in the UI
Hidden admin links, client-only role checks, and "fetch by id" APIs without an ownership check are classic broken access control — still #1 in the OWASP Top 10:2025. If your API returns another user's invoice when you change the id in the URL, the UI being "hard to find" does not matter.
4. Webhooks and payments that trust the client
Unsigned or unverified Stripe webhooks, trusting a paid=true flag from the browser, and skipping idempotency create charge-without-delivery or delivery-without-charge bugs. These are product bugs with security teeth.
5. Dependencies and generated glue code
AI scaffolds pull in packages cheerfully. Without npm audit / Dependabot / Renovate, you inherit yesterday's CVEs. Combine that with copy-pasted auth middleware and you get the "it works on my machine" launch.
A vibe-coded app security checklist you can run this week
Do these in order. Stop and fix Critical items before inviting real users.
- Inventory secrets. Search the repo and the built client for
service_role,sk_live,sk_test,BEGIN PRIVATE KEY,api_key, and your host's secret env prefixes. Rotate anything that ever touched git or a client bundle. - Turn on RLS / Security Rules everywhere. For every table or collection the client can touch: RLS enabled, policies require
auth.uid()(or equivalent) ownership, no blankettrueon sensitive data. Prefer policies in migrations so they are reviewable. - Prove tenancy with two users. Create User A and User B. As A, try to read/update B's records by id. Repeat for storage buckets and edge functions.
- Walk admin paths while logged out and as a normal user. Direct URL access, not just the menu.
- Verify webhooks. Reject bad signatures; do not trust client-reported amounts or plan names.
- Lock down auth flows. Password reset tokens random + expiring + single use; generic login errors; rate limits on login/OTP/reset.
- Run free scanners. gitleaks (history too), Semgrep or your stack's SAST,
npm audit/ bundler-audit / Trivy. Treat hits as leads, not gospel. - Check logging. No tokens, passwords, or full PANs in logs.
- Confirm hosting defaults. HTTPS forced, debug off, preview deployments not indexed with production data.
- Write down what you did not check. Production IAM, mobile binaries, a formal penetration test — honesty beats a fake green check.
What platform "security checkers" catch vs miss
Lovable and similar tools have added automated checks (for example RLS presence before publish). Those help. They are not a substitute for asking "does this policy match my product rules?" A policy that exists but says "any authenticated user can read all rows" will often pass a naive "RLS enabled?" gate.
When to get a human review
Run the checklist yourself first. Book a human review when:
- you are about to take real payments or store sensitive personal data
- an investor or customer is asking "who looked at this?"
- you built mostly in Lovable/Bolt/Cursor and cannot confidently answer the tenancy test above
Off The Rails offers a Ship-Ready Review — a senior engineer's pre-launch code and security review with human-verified findings (Quick Check $490). It is not a penetration test or SOC 2 audit.
Further reading
- Escape methodology and report (linked above)
- OWASP Top 10:2025
- Supabase RLS
- PortSwigger Web Security Academy (free labs)
- OTR: Ship-Ready Review · Is my Lovable/Bolt/Cursor app secure?
How to talk about risk without freezing the roadmap
Founders sometimes hear "2,000+ vulnerabilities" and either panic or dismiss it. A better framing:
- Treat public research as a prior, not a verdict on your app. Escape's numbers describe a large public sample, not your private staging deploy.
- Rank by user impact. Cross-tenant data exposure and auth bypass beat "missing security header" every time.
- Budget a review step the same way you budget QA. A few days before launch is cheaper than rotating every key after a screenshot hits Twitter.
- Separate "fix now" from "track in the backlog." Critical/High with a clear exploit path block launch; dependency upgrades can be a scheduled train.
If you use contractors or an AI-heavy workflow, write ownership down: who merges auth changes, who approves RLS policy changes, who rotates secrets. Vibes do not create accountability; names do.
A minimal two-hour tabletop
Sit with your co-founder or lead engineer and answer out loud:
- What is the worst record in our database if it leaked? (SSNs? chat contents? kids' data?)
- Can a signed-in user fetch another user's that record by changing an id?
- What keys are in the browser right now?
- What happens if a webhook fires twice?
- Who can run SQL or see production logs today?
Write the answers in a shared doc. Anything you cannot answer is a review task, not a vibe.
Want a second set of eyes before launch?
A Ship-Ready Review is a senior engineer's pre-launch code and security review with human-verified findings. Quick Check $490. It is not a penetration test or compliance audit.