{"slug": "5-security-holes-in-vibe-coded-apps-and-the-one-line-fix-for-each", "title": "5 Security Holes in Vibe-Coded Apps (and the One-Line Fix for Each)", "summary": "A developer built a one-click security audit tool for AI-generated (\"vibe-coded\") apps and tested it on a deliberately broken app, where it flagged all 33 planted problems — 4 critical and 10 high — including a Supabase service_role master key exposed in frontend code and an unverified Stripe payment webhook. The tool checks nine areas such as secrets, auth, payments and dependencies against the OSV vulnerability database, and found zero issues on a clean app. The work follows a November 2026 Crissy Field scan of 159,041 Lovable projects that found 24,664 exposing database records to the browser without login, which Lovable's head of security attributed to insufficient Row-Level Security.", "body_md": "I built a one-click security audit and ran it on an app I broke on purpose. It found 33 problems — 4 critical, 10 high — including a master database key sitting in the frontend code and a payment webhook anyone could fake.\n\nThis is not a rare edge case. In November 2026, the German security firm Crissy Field checked 159,041 Lovable projects and found 24,664 that sent database records to the browser with no login at all. Some of that data is meant to be public, and the researchers said so. But the pattern is real — Lovable's own head of security said the root cause was insufficient Row-Level Security. WIRED reported a separate scan that found more than 5,000 vibe-coded apps with virtually no authentication.\n\nAI builders wire up a database for you in minutes. The app works. The login screen works. Nothing looks broken. The problem is that the security part is invisible: the key in the browser is public by design, and the only thing protecting your data is a set of rules inside the database that the AI often never turns on. The app works fine either way, so nobody notices — until someone looks.\n\nHere are the five holes I see most. Each one is invisible in a working demo.\n\nWhat it is: your Supabase `service_role` key is in the frontend code or in a committed `.env` file. That key is a master key. It ignores every database rule.\n\nWhy it matters: anyone who opens your site can copy it from the JavaScript and read, edit, or delete every row in your database.\n\nThe fix: use only the `anon` key in the browser, keep `service_role` on the server, and rotate the leaked key.\n\nWhat it is: the Postgres connection string, with the real password, sits in a source file that gets pushed to GitHub.\n\nWhy it matters: anyone who can see the repo can log straight into your database — and if the repo is public, that means anyone.\n\nThe fix: move it to an environment variable and change the password now.\n\nWhat it is: an endpoint like `/api/users` returns or writes data without checking who called it.\n\nWhy it matters: the login screen only hides the button. The data is one `curl` command away.\n\nThe fix: check the session or token on every server route, never only in the UI.\n\nWhat it is: your Stripe webhook endpoint acts on any POST it receives, without checking the signature.\n\nWhy it matters: anyone can send a fake \"payment succeeded\" event and mark their order as paid without paying.\n\nThe fix: verify the signature with Stripe's SDK before you do anything with the event.\n\nWhat it is: your app uses a library version with a published vulnerability. In my test app it was lodash 4.17.15.\n\nWhy it matters: attackers scan for known vulnerabilities automatically. A published CVE is a known way in.\n\nThe fix: upgrade to the patched version and re-run the check.\n\nPaste a GitHub link, a zip, or a local folder. One command. A few minutes later you get a clean report: a score out of 100, the findings ranked by severity, and for each one what it means in plain English, numbered fix steps, and a prompt you can paste into your AI tool to fix it. It checks nine areas: secrets, data security, auth, payments, user flows, data structure, code quality, and deploy. It also checks your dependencies against the public OSV vulnerability database, so known holes like the lodash one get flagged.\n\nI tested it two ways. On the app I broke on purpose, it caught all 33 planted problems. On a clean, well-kept app, it found zero. It does not cry wolf.\n\nThe first 5 audits are free. After that it is $49, and that includes a human check of your Supabase dashboard — the one thing a scanner cannot see. If you built an app with Lovable, Bolt, v0, Cursor or Replit and you want to know what is actually open in it, send your GitHub link to [adilwaraich@outlook.com](mailto:adilwaraich@outlook.com).", "url": "https://wpnews.pro/news/5-security-holes-in-vibe-coded-apps-and-the-one-line-fix-for-each", "canonical_source": "https://dev.to/adil_mehmood_4068cd82d35e/5-security-holes-in-vibe-coded-apps-and-the-one-line-fix-for-each-537o", "published_at": "2026-11-23 17:37:13+00:00", "updated_at": "2026-11-23 17:43:01.938465+00:00", "lang": "en", "topics": ["ai-safety", "ai-tools", "ai-agents", "developer-tools"], "entities": ["Lovable", "Supabase", "Stripe", "Crissy Field", "WIRED", "OSV", "Bolt", "Cursor"], "also_reported_by": [], "takeaway": "AI-generated apps often ship with the Supabase service_role key in frontend code and no Row-Level Security, so auditing for exposed secrets, unauthenticated API routes and unverified webhook signatures catches holes that a working demo hides.", "recommendation": {"advice": "Audit AI-generated apps for exposed service_role keys, unauthenticated API routes and unverified webhook signatures, and enable Row-Level Security before shipping.", "playbook": "agent-security", "playbook_url": "https://wpnews.pro/playbooks/agent-security"}, "alternates": {"html": "https://wpnews.pro/news/5-security-holes-in-vibe-coded-apps-and-the-one-line-fix-for-each", "markdown": "https://wpnews.pro/news/5-security-holes-in-vibe-coded-apps-and-the-one-line-fix-for-each.md", "text": "https://wpnews.pro/news/5-security-holes-in-vibe-coded-apps-and-the-one-line-fix-for-each.txt", "jsonld": "https://wpnews.pro/news/5-security-holes-in-vibe-coded-apps-and-the-one-line-fix-for-each.jsonld"}}