AI threat
Vibe coding security: the bugs AI-built apps ship with
AI coding tools ship working apps in a weekend. They also ship missing access rules, keys in the browser and endpoints nobody reviewed.

"Vibe coding" means describing what you want and letting an AI tool such as Lovable, Bolt, Replit, v0 or Cursor write most of the code. It works. Founders ship a working SaaS in a weekend, and product teams prototype in an afternoon what used to take a sprint.
The security problems are just as consistent. The same handful of mistakes appears in app after app, and they are exactly the mistakes automated attackers search for. This post covers what the research has found, three real cases, and a checklist you can run on your own app today.
What the research found
Veracode's GenAI Code Security Report tested more than 100 language models on 80 coding tasks. The generated code contained a security weakness in 45 percent of cases. Java was worst, with failure rates above 70 percent; Python, C# and JavaScript ranged from 38 to 45 percent. This is a benchmark of isolated tasks, not a survey of live apps, but it shows that "it runs" and "it is safe" are different tests.
Source: Veracode, GenAI Code Security Report, July 2025
Escape looked at live apps instead. It scanned more than 5,600 publicly deployed vibe-coded applications and found more than 2,000 vulnerabilities, more than 400 exposed secrets and 175 instances of exposed personal data. The recurring causes were Supabase tokens in front-end bundles, missing row-level security and weak authentication.
Source: Escape, How we discovered vulnerabilities in apps built with vibe coding, October 2025
Three real cases
Lovable and CVE-2025-48757
In March 2025, a researcher found that many apps generated by Lovable shipped with insufficient row-level security (RLS) policies on their Supabase databases. Anyone with the public key from the app's front end could query tables directly. A scan of 1,645 Lovable showcase projects found 303 vulnerable endpoints across 170 projects, about one in ten. Exposed data included personal details, API keys and payment information. In one app, a user could set their own payment status to "paid" and skip Stripe. The issue was published as CVE-2025-48757 with a CVSS score of 9.3.
Source: Matt Palmer, Statement on CVE-2025-48757
Moltbook
In early 2026, Wiz researchers looked at Moltbook, a social network for AI agents. Its Supabase key was in the client-side JavaScript and RLS was not enabled, which gave read and write access to the production database. That exposed about 35,000 email addresses, 1.5 million API tokens and 4,060 private direct-message conversations. The platform fixed the issue after Wiz reported it.
Source: Wiz, Exposed Moltbook database reveals millions of API keys, February 2026
The pattern
Our analysis: in both cases the code worked as written. The bug was a missing rule, not a broken one. AI tools build what you describe, and few people describe "and make sure user A can never read user B's rows". Nobody notices in testing because every tester is logged in as themselves.
The bugs AI-built apps ship with
1. Missing or permissive row-level security
Supabase and Firebase let the browser talk to the database directly. That is safe only if every table has policies that limit each user to their own rows. A table with RLS turned off, or with a policy like using (true), is readable by anyone who has the public key, and the public key is in your front end by design.
2. Secrets in the bundle
Service-role keys, OpenAI keys, Stripe secret keys and webhook secrets end up in client code when an AI tool puts a server-side call in a React component. Anything in the bundle is public. Attackers and their agents read bundles automatically.
3. Authorization checked in the UI only
The admin button is hidden for normal users, but the admin API route does not check the role. Or the "edit" form only shows your own projects, but the API accepts any project id. These are broken function-level and object-level authorization, numbers 5 and 1 on the OWASP API Top 10.
4. Trusting fields the client sends
Price, plan, role, is_admin, payment_status. If the server accepts them from the request body, a user can set them. This is "broken object property level authorization" in OWASP terms, and it is what made the Lovable "paid" bypass possible.
5. Business flows with no limits
Unlimited sign-ups, invitation emails, password resets, coupon redemptions or AI calls billed to your account. Generated code rarely adds rate limits unless asked.
A one-hour checklist for your app
- Open your deployed app, view the page source and the JavaScript files, and search for
key,secret,sk_,service_roleandBearer. - In Supabase, list every table and confirm RLS is on and each policy limits rows to
auth.uid()or the user's organisation. - Create two accounts. As account A, copy an API request that reads or changes one of your objects. Replay it with account B's session. It should fail.
- Replay a profile or settings update with an extra field such as
"role":"admin"or"plan":"pro". It should be ignored. - Call every admin route as a normal user. Each should return 401 or 403.
- Send the same sign-up, invite or reset request 50 times quickly. Something should slow you down.
When to get a proper test
The checklist catches the obvious cases. It will not catch the second endpoint for the same object, the GraphQL query that bypasses your REST checks, or the multi-step flow that breaks only in a specific order. Those take systematic testing with several accounts and roles.
A good time to test is before you take real customer data or payments, before an enterprise customer's security review, and after any large AI-assisted rewrite. We test apps built with AI coding tools every week. Our agents read your bundle, map your API and try every access path with real accounts, and we only report what they could actually exploit.
Frequently asked questions
Is Lovable or Supabase insecure?
The platforms can be used securely. The problems found in research come from apps that shipped without row-level security policies, or with secret keys in front-end code. The responsibility for those rules sits with whoever builds the app.
How do I check Supabase row-level security?
In the Supabase dashboard, confirm RLS is enabled on every table and that each policy limits rows to the signed-in user or their organisation. Then test it: query the table with a second account's session and confirm you see nothing that is not theirs.
Should I get a pentest for an app built with AI?
Yes, before you take real customer data or payments, and after any large AI-assisted rewrite. AI tools rarely add authorization rules you did not ask for.
See what an attacker would find in your app
Our AI agents attack your web app or API with your permission, prove each finding with a working exploit, and senior pentesters review and sign the report.