Skip to content
Gab AI

Your Vibe-Coded App Might Be Leaking User Data: How to Audit AI-Built Projects for Security Holes

Reports indicate thousands of AI-built apps may have completely unprotected databases — potentially leaking sensitive personal data. Here's how to check yours.

Arya · · · 17 min read

Your Vibe-Coded App Might Be Leaking User Data: How to Audit AI-Built Projects for Security Holes

Your Vibe-Coded App Might Be Leaking User Data: How to Audit AI-Built Projects for Security Holes

Somewhere right now, a freelancer's side project may be serving sensitive documents to anyone with a browser and a URL. Not because they were hacked. Not because they made some exotic cryptographic mistake. But because the AI tool that built their app never turned on basic database protections — and nobody thought to check.

This isn't just a theoretical concern. According to reports from AI Weekly and Origin Brief, a significant number of projects built with Lovable, one of the popular AI "vibe coding" platforms, were found to have completely unprotected databases. The reports describe thousands of exposed projects — with claims of leaked personal data including identity documents and chat logs. While the exact scope and methodology behind these findings have not been independently verified at the time of writing, the underlying security pattern they describe is well-documented and affects AI coding tools broadly.

If you've used any AI coding tool to build an app, a prototype, or a client project — Lovable, Cursor, Bolt, or anything similar — this article is your wake-up call. And more importantly, it's your practical guide to fixing the problem before someone else finds it first.

What "Vibe Coding" Actually Means (And Why It Creates Security Gaps)

The term "vibe coding" describes a workflow where you describe what you want in plain English, and an AI tool generates the code for you. You don't need to understand JavaScript or database architecture. You just say something like "build me a customer intake form that saves responses to a database" and the tool does the rest.

It's genuinely powerful. People who couldn't build software six months ago are now shipping functional apps in an afternoon. Small business owners are creating internal tools. Freelancers are prototyping client ideas at a pace that would have been unthinkable a few years back.

But here's the problem: functional and secure are two very different things.

When an AI coding tool generates your app, it optimizes for getting something working. It connects your front end to a database. It sets up forms that save data. It makes things look right and behave correctly from the user's perspective. What it often doesn't do — unless you specifically ask — is lock down who can access that data.

Think of it like hiring a contractor to build a house. They put up the walls, install the doors, wire the electricity. Everything works. But they never installed locks on the doors. The house functions perfectly. It's just that anyone can walk in.

That's the pattern described in the Lovable reports. The apps worked. The databases stored data. But the access controls — the locks — were never configured. And because the people building these apps weren't traditional developers, they didn't know to check.

Why This Is Happening Now

The reports about Lovable, covered by AI Weekly and Origin Brief, point to a much bigger shift — not an isolated incident.

AI-assisted coding tools have crossed a threshold. They're no longer toys for developers to speed up their workflow. They're being used by non-developers — entrepreneurs, creators, freelancers, small teams — to build real products that handle real user data. And the security gap between "this works" and "this is safe to deploy" is widening fast.

A few things are colliding at once:

The tools default to open. Many AI coding platforms use Supabase (an open-source database service) as their backend. Supabase is excellent, but it creates new tables with Row Level Security (RLS) disabled by default. This is documented in Supabase's own documentation — it's a known design choice that puts the responsibility on the developer to enable it. That means unless someone explicitly turns RLS on, every row in every table is accessible to anyone who knows the database URL. The AI tools that scaffold projects on top of Supabase often don't enable it automatically.

Users don't know what they don't know. If you've never built software before, you might not even know that database security is a separate step. The app works. Data saves. Everything looks fine. The idea that your database might be publicly readable doesn't cross your mind because nothing in the interface tells you it is.

Speed is the selling point. The entire value proposition of vibe coding is velocity. Build fast. Ship fast. Iterate fast. Security audits slow things down. They're boring. They don't make the demo look better. So they get skipped — not maliciously, but by default.

The result? Potentially thousands of apps in production, handling sensitive data, with the digital equivalent of an unlocked front door.

The Real-World Consequences of AI Vibe Coding Security Risks

Let's make this concrete, because abstract security warnings are easy to ignore.

Scenario 1: The freelancer's client portal. You built a simple portal for a client where their customers upload documents — IDs, contracts, signed forms. The AI tool connected a nice upload interface to a Supabase storage bucket. Works great. But without proper access rules, anyone can list and download every file in that bucket by hitting the right URL. Your client's customers' sensitive documents are now public.

Scenario 2: The small business booking app. You created a scheduling tool for your business. Customers enter their name, email, phone number, and appointment details. That data goes into a database table. Without RLS enabled, a simple API request returns every customer record. Names, emails, phone numbers — all of it.

Scenario 3: The community chat tool. You built a messaging feature for your group or organization. People share personal updates, health information, private conversations. Without authentication checks on your database queries, those messages are readable by anyone.

These aren't edge cases. These are the exact types of projects people build with vibe coding tools. And the reports about Lovable suggest that a substantial percentage of AI-built projects may have these kinds of exposures — making this a systemic issue, not a rare one.

Your Step-by-Step Security Audit Checklist

Here's the good news: you don't need to be a security expert to fix this. The most common vulnerabilities in AI-generated apps are basic configuration issues, not sophisticated exploits. If you can follow a checklist, you can close these holes.

Work through these steps in order. Set aside about an hour. It's the most important hour you'll spend on your project.

Step 1: Check If Your Supabase Row Level Security (RLS) Is Enabled

This is the single biggest issue. If your AI-built app uses Supabase (and many do), this is where you start.

  1. Log into your Supabase dashboard at app.supabase.com.
  2. Select your project.
  3. Click Table Editor in the left sidebar.
  4. For each table in your database, look for the RLS badge. It will say either "RLS enabled" or "RLS disabled."
  5. If any table says "RLS disabled" — especially tables that store user data — you have an exposed database.

To enable RLS:

  1. Click on the table name.
  2. Go to Authentication (or the RLS section, depending on your dashboard version).
  3. Toggle Enable Row Level Security to on.
  4. Critical: Enabling RLS without adding any policies will block ALL access, including your app's access. You need to add policies that define who can read and write what.

A basic policy for a table where users should only see their own data looks like this:

Text example
Text
Name: Users can view own data
Operation: SELECT
Using expression: auth.uid() = user_id

This says: "Only let someone read a row if their logged-in user ID matches the user_id column in that row." You'll want similar policies for INSERT, UPDATE, and DELETE.

If you're not sure what policies you need, here's a prompt you can use with an all-in-one AI tool to help you figure it out:

Prompt: "I have a Supabase table called [table_name] with these columns: [list columns]. Users should only be able to see and edit their own rows. Write me the RLS policies I need for SELECT, INSERT, UPDATE, and DELETE operations. Explain each one in plain English."

Step 2: Scan for Hardcoded API Keys and Credentials

AI coding tools sometimes embed sensitive credentials directly in your front-end code. This means anyone who views your website's source code can see your database keys, API secrets, or service passwords.

  1. Open your project's codebase (wherever your AI tool stores it — GitHub, the platform's built-in editor, etc.).
  2. Search the entire codebase for these terms:
    • supabase_key
    • service_role
    • api_key
    • secret
    • password
    • token
    • PRIVATE
  3. If you find any of these in files that end in .js, .ts, .jsx, .tsx, or .html — especially in folders called public, src, or components — you likely have exposed credentials.

The fix: Sensitive keys should be stored in environment variables (files called .env or .env.local) that are never included in your public code. Your AI tool should have a way to set environment variables — look for a "Settings" or "Environment" section in the project dashboard.

One key distinction that trips people up: Supabase has two keys — an anon key and a service_role key. The anon key is designed to be used in front-end code (it's limited by your RLS policies). The service_role key bypasses all security. If your service_role key is anywhere in your client-side code, treat it as a five-alarm fire. Rotate it immediately in your Supabase dashboard and move it to a server-side environment variable.

Step 3: Test Your Public Endpoints

This step lets you see what an attacker would see. You're going to try accessing your own data without logging in.

  1. Open a new browser window in incognito/private mode (so you're not logged into anything).
  2. If your app uses Supabase, try this URL pattern in your browser: https://[your-project-id].supabase.co/rest/v1/[table_name]?select=* Add this header (you can use a tool like Reqbin or just a browser extension for testing API requests): apikey: [your anon key]
  3. If you get back actual data — rows from your database — without being logged in, your table is unprotected.

Do this for every table. Yes, every one. The AI tool might have secured some tables and left others wide open.

A simpler alternative if the above feels too technical: Try using your app's features in an incognito window without logging in. Can you see data that should require authentication? Can you access pages that should be restricted? Sometimes the simplest test is the most revealing.

Step 4: Verify Authentication Is Actually Required

Many AI-generated apps have login screens that are purely cosmetic. The login page exists, but the data behind it isn't actually protected — the login is just a UI element, not a security gate.

  1. Log into your app normally and navigate to a page that shows user-specific data.
  2. Copy that page's URL.
  3. Open an incognito window and paste the URL.
  4. If you can see the data without logging in, your authentication is decorative, not functional.

Real authentication means the server (or database) checks whether the request comes from a verified user before returning data. A login page that just shows or hides content using front-end code is like a curtain in front of an open door — it blocks the view but not the access.

Step 5: Check File Storage Permissions

If your app lets users upload files (images, documents, anything), those files are stored somewhere — usually Supabase Storage or a similar service.

  1. In your Supabase dashboard, go to Storage.
  2. Click on each bucket.
  3. Check whether the bucket is set to Public or Private.
  4. If it's public and contains user-uploaded files (especially anything sensitive), change it to private and add appropriate access policies.

A public storage bucket means every file in it is accessible via a direct URL. No authentication needed. This is how sensitive documents end up on the open internet.

Step 6: Set Up Basic Monitoring

Once you've locked things down, you want to know if something goes wrong in the future.

  1. In Supabase, enable Database Webhooks or Postgres Logs so you can see unusual access patterns.
  2. Set up email alerts for failed authentication attempts if your platform supports it.
  3. Check your access logs weekly for the first month, then monthly.

You don't need enterprise-grade monitoring. You just need to not be flying completely blind.

Copy-Paste Prompts for Your Security Audit

If you use an AI writing assistant or chat tool to help you work through technical tasks, here are prompts you can adapt for your specific situation:

Prompt 1 — RLS Policy Generator: "I have a Supabase project with these tables: [list your tables and their columns]. For each table, tell me: (1) Should RLS be enabled? (2) What policies do I need so that users can only access their own data? (3) Write the SQL for each policy and explain what it does in plain English."

Prompt 2 — Credential Scanner: "Review this code and identify any hardcoded API keys, secrets, passwords, or tokens that should be moved to environment variables. For each one you find, tell me: what it is, why it's a risk, and where it should be stored instead. [Paste your code]"

Prompt 3 — Security Checklist Customizer: "I built an app using [tool name] that does [describe your app]. It uses Supabase for the database and handles [describe what data you store]. Create a security checklist specific to my app, ordered by risk level. Focus on the most dangerous issues first."

Prompt 4 — Plain-English Explainer: "Explain what Supabase Row Level Security is and why it matters, like you're talking to someone who built their first app using an AI tool and has never thought about database security before. Include what happens if it's not enabled."

These prompts work best when you give them specific details about your project. The more context you provide, the more useful the output. And always verify the AI's suggestions against Supabase's official documentation — don't blindly apply security policies without understanding what they do. For more guidance on getting better results from AI tools, check out our guides and how-to articles.

What Most People Get Wrong

"My app has a login page, so it's secure." This is the most dangerous misconception. A login page is a user interface element. Security happens at the database and server level. If your database doesn't verify who's making a request, the login page is theater.

"The AI tool would have told me if something was insecure." Most AI coding tools optimize for functionality, not security. They're designed to get your app working, and they're very good at that. But "working" and "secure" are separate concerns. The tool likely didn't warn you because it wasn't designed to.

"Nobody would find my app's database." Supabase project URLs follow predictable patterns. Automated scanners crawl the internet constantly looking for exposed databases. Security through obscurity — hoping nobody stumbles across your data — is not a strategy. The Lovable reports illustrate this: exposed projects were apparently discovered through systematic scanning, not targeted attacks.

"I'll deal with security later, once the app gets traction." Data leaks don't wait for your launch timeline. If your app is live and collecting data — even from a handful of beta testers — it needs to be secured now. "Later" is how you end up explaining to users why their personal information is on the open internet.

"I just need to secure the important tables." Every table with user data needs RLS. That includes tables you think are harmless. Email addresses, usage patterns, even seemingly anonymous data can be combined to identify people. Secure everything, then selectively relax restrictions where appropriate — not the other way around.

Quick Start: What You Can Do in the Next 30 Minutes

If you're reading this and feeling a knot in your stomach, here's what to do right now:

  1. Log into your Supabase dashboard (or whatever database your AI tool connected to).
  2. Check RLS status on every table. This takes five minutes. If any table with user data has RLS disabled, you've found your biggest problem.
  3. Enable RLS on all tables immediately. Yes, this might temporarily break your app's ability to read data. That's better than leaking it.
  4. Add basic policies so your app works again, but only for authenticated users accessing their own data.
  5. Search your codebase for service_role. If it appears in any front-end file, rotate the key in Supabase and move it to an environment variable.
  6. Test in incognito mode. Try to access your app's data without logging in. If you can, keep working on your policies.

That's your minimum viable security. It won't make your app Fort Knox, but it will close the most gaping holes — the ones that account for the kinds of exposures described in the Lovable reports.

Why This Matters Beyond Your Own App

If you're building things for clients — and many freelancers and small agencies are using AI coding tools to do exactly that — the stakes are even higher. You're not just responsible for your own data. You're responsible for your client's users' data.

A data leak from an app you built can mean:

  • Legal liability, especially if you're handling data covered by GDPR, HIPAA, or state privacy laws
  • Loss of client trust (and the client relationship)
  • Regulatory fines that can be devastating for a small business
  • Reputational damage that follows you

The Lovable reports describe exposures involving sensitive personal data — the kind of exposure that can trigger mandatory breach notifications and regulatory investigations.

If you're building for others, the security audit isn't optional. It's part of the job. Build it into your process and your pricing. For context on how responsible platforms handle user data, you can review our privacy policy as an example of clear data handling practices.

How an All-in-One AI Tool Helps You Stay Safer

One underappreciated aspect of this problem is tool fragmentation. When you're bouncing between an AI coding platform, a separate database service, a different tool for generating images or content, and yet another for documentation — things fall through the cracks. Security configuration gets missed because it lives in a different dashboard than the one you're working in.

Using a unified platform where you can create text, images, videos, music, and more in one place doesn't just save time. It reduces the number of separate systems you need to secure and monitor. Fewer tools means fewer attack surfaces, fewer sets of credentials to manage, and fewer places where a misconfiguration can silently expose data.

This doesn't replace a security audit. But it does mean fewer things to audit.

The Bigger Picture: AI Tools Are Powerful, But They Need a Human in the Loop

None of this means you should stop using AI coding tools. They're genuinely transformative for people who want to build software without spending years learning to code. The freelancer who ships a client portal in a day instead of a month is doing something remarkable.

But the current generation of these tools has a blind spot, and it's a serious one. They're great at making things that work. They're not yet great at making things that are safe. That gap is your responsibility to close.

The good news is that closing it isn't that hard. The checklist above covers the most critical issues, and none of it requires deep security expertise. It requires awareness, a willingness to spend an hour checking, and the discipline to make it part of your process rather than an afterthought.

Reports suggest that a significant share of AI-built apps may be leaking data right now. Don't let yours be one of them.


Ready to build smarter — and safer? Start creating text, images, videos, music, and more in one place at https://gab.ai. And if you want to go deeper on practical AI workflows, browse our full library of guides and tutorials. You can also download the app to keep your AI toolkit accessible wherever you work.

Try Gab AI

Try Gab AI for uncensored chat, real-time web search, and high-quality content generation.

Back to Blog

Related Articles

Ready to try Gab AI?

One AI for everything — text, images, videos, music, voice, and more. Start free today.