Vibe Coding Security: 7 Risks That Actually Hurt Founders
Founder & CTO, Buttercloud
The 14-point launch checklist tells you what to check the week you go live. This article is the one underneath it: why those checks exist, what has actually gone wrong for founders who skipped them, and who should own each area once the app is live and changing every day.
Here is the thesis, and it is the same one security researchers keep arriving at. Vibe coding security is not a code quality problem. It is a defaults problem. The model writes a working feature. It does not switch on the database policy, verify the payment webhook, rotate the key it just pasted into the frontend, or set up a way to undo the deploy. Those were never in the prompt, so they were never in the output.
The first large study said the same thing in numbers. Escape.tech scanned more than 5,600 publicly deployed vibe-coded apps and found over 2,000 vulnerabilities, more than 400 exposed secrets and 175 instances of exposed personal data. Most of the vulnerabilities were reachable without authentication. Nobody had to break in.
Defaults can be checked. Below are the seven that matter, each with a documented incident, the one-line check, the fix, and who should own it after launch. None of this is an argument against building the way you built; we wrote separately on whether vibe coding is bad, and the short answer is no, as long as somebody is reading.
The seven, in one table
| # | Risk area | The one-line check | Owner after launch |
|---|---|---|---|
| 1 | Database access rules | Is row-level security on, with a policy, for every table with user data? | Engineer who reviews changes |
| 2 | Secrets in the repository and the client | Does the built JavaScript or the git history contain a secret key? | Engineer, with scanning turned on |
| 3 | Auth and sessions | Can a logged-out user reach a logged-in page, and do sessions ever expire? | Engineer |
| 4 | Payments and webhooks | Does the webhook handler verify the Stripe signature and ignore duplicates? | Engineer, before live mode |
| 5 | Email and the domain | Do SPF, DKIM and DMARC exist for the sending domain? | Founder, once; DevOps, ongoing |
| 6 | Deploys and rollback | Can you put the previous version back in under five minutes? | DevOps |
| 7 | Dependencies and AI-written patches | Does every package exist, and does someone read the model’s security fixes? | Engineer |
1. Database access rules
What goes wrong. Most AI builders generate an app where the browser talks to the database directly through a public key. That is a legitimate design, but it only works if the database itself enforces who can see what. Supabase’s documentation says it plainly: a table in an exposed schema without row-level security is readable and writable by any role with a grant on it. The model writes the CREATE TABLE. It rarely writes the policy.
The incident. In May 2025 the gap was given a CVE. CVE-2025-48757 describes an insufficient row-level security policy in Lovable-generated sites that allowed remote unauthenticated attackers to read or write arbitrary tables. Lovable disputed it, on the grounds that each customer is responsible for their own data, and that position is defensible: the platform did not write the policy, and neither did the founder. In February 2026 the same shape resurfaced. The Register reported a researcher’s disclosure of 16 vulnerabilities in one Lovable-built education app, six of them critical, with 18,697 user records exposed. Lovable’s response was that the project’s free pre-publish security scan had flagged issues that were never applied. The tool warned. Nobody acted.
The check. Open the database dashboard. Every table that holds user data should show row-level security enabled and at least one policy. If RLS is enabled with no policies, the app will simply return no data through the publishable key, which is the safe failure and also the reason founders turn it back off.
The fix. Write the policies: users read and write their own rows, admins read everything, public tables are read-only. Test them by signing in as a second user and trying to read the first user’s data. Our Supabase row-level security guide for founders walks through the four policies every SaaS needs, and our review of Lovable’s security covers where the platform’s scan stops and your work starts.
Owner. Whoever reviews code changes. Every new table the model creates needs a policy, so this is a line item in every review, not a one-time check.
2. Secrets in the repository and the client
What goes wrong. The model needs a key to make a feature work, so it puts the key where the feature is: a committed .env file, or the frontend, where it ships to every visitor’s browser inside the JavaScript bundle. Supabase’s rule could not be clearer: the publishable key is safe to expose, and the secret key bypasses every row-level security policy and must never be used in a browser, even on localhost.
The incident. Escape’s scan found more than 400 exposed secrets across 5,600 apps. The wider problem is counted every year: GitGuardian’s State of Secrets Sprawl 2025 found 23.8 million new secrets leaked on public GitHub in 2024, up 25% on the year before, and 70% of the secrets leaked in 2022 still active. Leaked keys do not expire on their own.
The check. Two searches. First, the built frontend: open the deployed site, view the JavaScript, and search for sk_live, service_role, sb_secret and your providers’ names. Second, the git history, not just the current files. A key committed once lives in history until the history is rewritten.
The fix. Move every secret to the server or the host’s environment variables. Rotate anything that was ever exposed. Then turn on the free tooling: GitHub’s secret scanning runs automatically on public repositories and notifies the provider when it finds a partner’s key, and push protection blocks the push before the secret lands. Make the repository private while you are there.
Owner. An engineer, with scanning doing the daily work. The rotation is the part tooling cannot do for you.
3. Auth and sessions
What goes wrong. The sign-in page works, so the founder assumes the protection behind it works too. Two things fail quietly: an authorization check that is wrong, and a session that never ends.
The incident. The February 2026 Lovable disclosure above included an authentication check with inverted logic. It blocked logged-in users and let unauthenticated users through, on an app with more than 100,000 views. Nobody had tried the obvious thing: open a protected page while logged out. On sessions, Supabase documents that a session, by default, lasts indefinitely. Time-boxed sessions, inactivity timeouts and single-session-per-user are settings you have to turn on, and on Supabase they sit on paid plans. A stolen session token on a default setup is a permanent key.
The check. Log out. Paste the URL of a logged-in page, then the URL of another user’s record, then call the API with no token. If any of them returns data, stop and fix it before anything else. Then check your auth settings for session length.
The fix. Authorization belongs in two places: the database policy (area 1) and the server route, never only in the frontend, which the model loves to use as the gate. Set a session lifetime that matches your product: hours for anything touching money or health data, days for a consumer tool. OWASP lists Broken Access Control as A01 and Authentication Failures as A07 in its 2025 Top 10 for a reason.
Owner. An engineer, on every change that adds a page or an endpoint. The one question to ask in every review: who is allowed to call this, and where is that enforced?
4. Payments and webhooks
What goes wrong. The model wires Stripe Checkout in twenty minutes, then writes a webhook endpoint that marks the order paid when a request arrives. What it often skips is checking that the request came from Stripe. Stripe’s documentation spells out the consequence: without verification, an attacker could send fake webhook events to your endpoint to trigger actions like fulfilling orders, granting account access, or modifying records. Anyone who can guess your webhook URL can grant themselves a paid plan.
The evidence. This one has not produced a headline incident with a named vibe-coded app yet, and we are not going to invent one. What we have is Stripe’s own warning, which exists because it happens, and what we see in review: handlers that parse the body and never look at the Stripe-Signature header. The same page notes that Stripe does not guarantee event order and may deliver an event twice, so a handler that does not track event IDs will also double-fulfil.
The check. Open the webhook handler. It should construct the event from the raw body, the signature header and a whsec_ secret, reject anything that fails, and skip event IDs it has already seen. If it reads the JSON first and verifies later, or not at all, it is wrong.
The fix. Use Stripe’s library to verify, with the default five-minute tolerance, and store processed event IDs. Keep the webhook secret on the server. Test with the Stripe CLI before switching to live keys. Our go-live plan for vibe-coded SaaS covers the rest of going live commercially: live mode, terms and the first customers.
Owner. An engineer, before the first real charge. Payments code should never go live on the strength of “it worked in test mode”.
5. Email and the domain
What goes wrong. Your app sends sign-up confirmations, password resets and receipts. Whether they arrive depends on DNS records no AI builder sets, because they live at your domain registrar, not in the codebase.
The evidence. Google’s sender guidelines require every sender to set up SPF or DKIM and keep spam rates below 0.3%, and require anyone sending 5,000 or more messages a day to Gmail to have SPF, DKIM and DMARC. Fall short and password resets land in spam, which looks to your users exactly like a broken app. Without DMARC, anyone can send email that appears to come from your domain.
The check. Look up the TXT records for your domain and for _dmarc.yourdomain.com. The checklist post covers the three records one by one.
The fix. SPF listing your provider, DKIM from your provider’s dashboard, DMARC starting at p=none with a reporting address, then tightened to quarantine and reject once the reports are clean.
Owner. The founder sets it up once. A DevOps partner watches the reports and tightens the policy, because the records drift every time you add a new tool that sends on your behalf.
6. Deploys and rollback
What goes wrong. The app deploys on every push. That is wonderful until a push breaks production and there is no way back, or the environment the agent was “testing” in turns out to be the live one.
The incident. In July 2025, SaaStr founder Jason Lemkin documented a twelve-day build on Replit in public. On day eight, The Register reported, the agent deleted the production database despite explicit instructions not to change anything, admitted to what it called a catastrophic error of judgement, and then wrongly told him a rollback was impossible. The rollback did work in the end. His conclusion, quoted in the piece, was that there was no way to enforce a code freeze in that kind of tool. The lesson is not about one vendor. An agent with access to production will eventually touch production.
The check. Three questions. Is there a staging environment the agent works in, separate from the one customers use? Can you put the previous deploy back in under five minutes, and have you done it once? Does rollback cover the database, or only the code?
The fix. Separate environments, even if staging is a second project on the same host. Know your platform’s rollback: Vercel’s Instant Rollback, for example, lets Hobby accounts return only to the immediately previous deployment and does not roll back environment variables or your database. For the database, that means tested backups and reversible migrations. Run one rollback drill before launch so the first time is not during an incident.
Owner. DevOps, which on a small product means either a partner or the founder with a written runbook. Our DevOps as a Service page describes what that looks like without a hire.
7. Dependencies and AI-written patches
What goes wrong. Two problems, both new. First, models invent package names. Second, when you ask the model to fix a security issue, it produces something that looks like a fix, and nobody checks whether it is one.
The evidence. On the first, a study presented at USENIX Security 2025 generated 576,000 code samples and found commercial models recommended non-existent packages in 5.2% of cases on average, and open-source models in 21.7%, with 205,474 unique hallucinated names. Attackers register those names, a practice now called slopsquatting, and the next founder who runs the install gets the attacker’s code. On the second, Veracode’s 2025 GenAI Code Security Report ran 80 coding tasks across more than 100 models and found the generated code introduced vulnerabilities in 45% of cases, failing to protect against cross-site scripting 86% of the time. The model that wrote the bug is the model you are asking to fix it. OWASP’s 2025 list has Software Supply Chain Failures at A03.
The check. Open the lockfile and the dependency list. Does every package exist on the registry, with a history and real downloads? Then open the last “security fix” the model wrote. Does it address the cause, or wrap it in a try/catch?
The fix. A committed lockfile so every deploy installs the same versions. Dependabot security updates, which raise pull requests when a dependency has a known vulnerability. And a human reading every patch the model writes, which is the subject of our piece on AI code review for vibe-coded apps.
Owner. An engineer. This is where “the AI fixed it” is most tempting and least true.
Who owns this after launch
The pattern across all seven: each is a defaults problem at launch and a review problem afterwards. The app will keep changing, because that is the point of building this way, and every change can reintroduce any of the seven. A new table without a policy. A new endpoint without a check. A new package that does not exist.
So the real question is not “did we run the checks” but “who reads the changes”. On a solo-founder product that is one of three people: a technical co-founder, a fractional CTO who reviews weekly and owns the architecture, or a DevOps partner who owns deploys, backups and alerts while you own the product. We have written about when a startup needs a CTO; for most vibe-coded products the right first step is a fractional one, at $5,000 to $12,000 a month depending on scope, rather than a hire.
What this does not cover
It does not cover the logic inside your features or the injection and input-handling classes in the rest of the OWASP list. That needs a review by someone who reads code for a living, on every change. It does not cover compliance: if you handle health or payment data, start with our guides on HIPAA-compliant development and compliance for fintech. And it does not replace a penetration test when a customer’s procurement team asks for one. That comes later, and goes better when the seven above are already closed.
The plain summary
Vibe coding did not invent a new class of vulnerability. It handed working software to people who had never been told about row-level security, webhook signatures or DMARC, and the tools, reasonably, did not volunteer. The Tea app leak in July 2025 is the reminder: roughly 72,000 images, including identity photos, exposed from an unprotected Firebase storage bucket in a legacy system that predated vibe coding entirely. Same default, no AI involved. The failure mode is human and old. So is the fix: someone checks, and someone keeps checking.
If you would rather have that someone before launch, talk to us. A senior engineer runs the seven areas on your app and you get the findings and fixes in writing. If you want the reading to continue after launch, that is what a fractional CTO or DevOps partner is for.
Vibe Coding Security FAQs
Is vibe coding a security risk? The generated code is rarely the problem. The risk is in the defaults around it: database access rules left off, secret keys in the browser bundle, webhooks that are never verified, sessions that never expire, deploys with no rollback. Every documented vibe-coding incident so far traces back to one of those, and each is fixable in hours once someone checks.
What is the single most dangerous vibe coding security mistake? Shipping a database that the browser talks to directly without row-level security. Supabase’s own documentation says a table without RLS is readable and writable by any role with a grant on it, and the publishable key is public by design. That exact gap was assigned CVE-2025-48757 in 2025 and resurfaced in a February 2026 disclosure that exposed 18,697 user records from one Lovable-built app.
Can AI tools check their own security? Partly. Lovable runs a pre-publish scan, GitHub blocks pushes that contain known secret formats, and Supabase warns about tables without policies. None of them can tell whether your policy is right, whether your webhook handler verifies signatures, or whether you have ever restored a backup. Those need a human who reads the code.
Do I need a security audit before launching a vibe-coded app? You need the seven checks in this article run by someone who understands them, which takes an afternoon, not a formal audit. A penetration test or a SOC 2 programme comes later, when a customer’s procurement team asks for one. Before launch, the goal is to close the defaults that researchers find with automated scans.
Who should own security after a vibe-coded app launches? Someone with a name. On a solo-founder product that is usually a fractional CTO who reviews changes weekly, or a DevOps partner who owns deploys, backups and alerts, with you as the second line for product decisions. The failure mode to avoid is nobody: the app keeps changing, and nobody is reading the changes.
Have a product idea to talk through?
We'll show you how we'd approach it — no pressure, just a real conversation.
Book a Discovery Call