On this page

A vibe-coded website is only as secure as the checks you run before launch. AI tools write code that works long before it writes code that's safe. In Veracode's October 2026 tests, 38% of AI coding tasks still produced code with a known vulnerability. Check four things first: database access rules, secret keys in the browser, how logins work, and outdated packages.

Vibe coding is wonderful for getting from idea to working site in a weekend. You describe what you want, the AI builds it, and within hours you have a site with a database, logins and a contact form. The trouble is that "working" and "safe" are different tests, and AI tools are much better at the first. A site can look perfect and still let anyone with a browser read every row in your customer table.

This isn't a reason to stop. It's a reason to run a short set of checks before launch, most of which need no coding at all. This guide starts with how risky your particular site is, then looks at how often AI code has flaws, the four holes behind most incidents, the checks to run, how to get the AI to help fix them and when to bring in a developer.

How risky is your AI-built site?

What your site has Risk Check before launch
Static pages only, no forms Low Hosting settings, no keys in the code
A contact form Medium Server-side validation, spam protection
A database (Supabase, Firebase) High Access rules on every table, tested logged out
Logins or user accounts High Platform auth only, password reset tested
Payments or personal data Very high A developer reviews it before launch

Who is this guide for?

It's for anyone who built a site or small app with Lovable, Bolt, Replit, Base44, v0, Cursor or Claude Code and wants to know if it's safe to put live. You don't need to read code to run most of these checks. You do need to know when to stop and bring in someone who can. My guide to vibe coding a website covers how to build one.

Before the checks, it's worth knowing how common the problem is, because the numbers explain the urgency.

How often does AI-generated code have security flaws?

Often, and newer models have only partly fixed it. In 2025, Veracode tested code from more than 100 language models on 80 coding tasks built to expose common weaknesses. 45% of the samples failed security tests and introduced flaws from the OWASP Top 10, and models failed to defend against cross-site scripting in 86% of relevant samples.1 Its October 2026 snapshot of 18 newer models found the first real improvement, yet 38% of tasks given no security guidance still produced vulnerable code, and models defended against cross-site scripting only 18% of the time.2

How often AI-built code and apps fail on security

AI coding tasks with vulnerable code, 202545%AI coding tasks with vulnerable code, Oct 202638%Lovable apps scanned with readable data endpoints10.3%
Veracode's tests of 100+ models in 2025 and 18 models in October 2026, vendor research12. 170 of 1,645 Lovable apps scanned in March 20255.

The problem shows up in live apps too. Escape, a security vendor, scanned more than 5,600 publicly available apps built on vibe coding platforms. It reported over 2,000 vulnerabilities, more than 400 exposed secrets and 175 cases of exposed personal data, including medical records and bank account numbers.3 That's the vendor's own research.

Statistics are abstract until you see the holes behind them.

What actually goes wrong?

Four holes cause most of the damage. Each one has a real incident behind it.

Open database rules

The most common serious hole is a database anyone can read or write. Many AI-built apps use Supabase, which puts a public key in the browser on purpose. What protects the data is row-level security, a set of rules on each table about who may read or change which rows. Supabase's own documentation says to turn it on for every table in an exposed schema, because a table without it is readable and writable by anyone with access to the schema.4

In March 2025, a researcher scanned 1,645 apps built with Lovable. 170 of them, about 10%, had 303 endpoints that could be read without logging in. The exposed data included email addresses, phone numbers, payment details and API keys.5 The issue was registered as CVE-2025-48757, described as insufficient row-level security policies that let unauthenticated attackers read or write database tables.6

Secret keys in the browser

AI tools often paste secret API keys straight into front-end code, where anyone can see them. GitGuardian found 28.65 million new hardcoded secrets in public GitHub commits in 2025, a 34% rise on the year before. Secrets for AI services alone rose 81%, to 1,275,105.7 Commits co-written by AI coding tools leaked secrets at about twice the baseline rate in its sample.7 That's GitGuardian's own data.

A key in the browser is a key you've published. Anyone can copy it and run up your bill, send email as you, or read your data.

Homemade logins

Logins the AI wrote from scratch are where the worst bugs hide. In July 2025, Wiz found that on Base44, a vibe coding platform owned by Wix, attackers could register for private apps using only a public app ID. That bypassed every login control, including single sign-on.8 Wix fixed it within 24 hours and found no sign it had been abused.8 That one was in the platform itself. In your own app, a homemade login or password reset has no team watching it at all.

Outdated packages

AI tools install whatever package version they learned about, which may be old. Software supply chain failures entered the OWASP Top 10 at number three in its 2025 edition. Broken access control stayed at number one.9 Both describe the holes above.

Each of those holes has a check you can run before launch.

What should you check before launch?

Run these in order. The first three need no coding.

  1. Test the database logged out. Open your site in a private window without signing in. If any page shows data that belongs to a user, stop. In Supabase, open each table and confirm row-level security is on and has a policy for each action.
  2. Search the code for keys. In your builder's code view, search for sk_, secret, api_key, token and password. Any secret in front-end code moves to the server or the platform's secrets vault, and the old key gets revoked.
  3. Use the platform's login. Supabase Auth, Firebase Auth, Clerk or your builder's own login. Delete any custom login code the AI wrote. Test sign-up, sign-in, password reset and sign-out.
  4. Validate forms on the server. Every form checks its input on the server, not just in the browser, and has spam protection.
  5. Run the platform's security scan. Lovable, Supabase and most builders now include one. Fix everything marked critical or high.
  6. Audit the packages. Run npm audit or the platform equivalent, and update anything with a known vulnerability.
  7. Check the response headers. Your host should send HTTPS only, with a content security policy and the standard security headers. Most managed hosts do this for you.
  8. Get a review for money and personal data. If the site takes payments, stores health or financial data, or has accounts with personal details, a developer reviews it before launch. This is the one step you can't do yourself.

My AI website launch checklist covers the rest of launch: facts, accessibility, speed and AI search.

The AI that wrote the code can also help fix it, if you ask the right way.

Can you ask the AI to fix security?

Yes, if you ask for specific checks, and then verify them yourself. A model that wrote the hole rarely finds it when asked "is this secure?" It finds far more when you name the risk.

Prompts that work:

  • "List every table in the database. For each one, show the row-level security policies and explain who can read, insert, update and delete rows."
  • "Search the whole project for secret keys or tokens in front-end code. List each file and line."
  • "Show me where each form validates its input on the server."

Then check what it tells you against the platform's own dashboard. A policy can exist and still let everyone in, so read what each one allows, and repeat the logged-out test from step 1.

Some sites need more than a checklist and a careful prompt.

When should you bring in a developer?

Bring one in before launch if the site handles money, logins or personal data, and at least once a year after. A static marketing site built in Framer, Webflow or Wix's AI can usually launch after the checks above. The platform handles hosting and security. My comparison of AI website builders shows which tools are which. For WordPress themes and plugins, see building WordPress with AI.

An app with a database is different. Paying for a few hours of review costs far less than a breach. My guide to AI builder or web designer helps you decide who builds what. When I work on an AI-built site on my web design work, the security pass and a handover document come first, before any redesign.

What does a pre-launch security check look like?

Here's how the checks might go for a small booking app built in Lovable with Supabase. It's an illustration of the order, not a client audit.

Check What was found Fix
Logged-out test The bookings table showed every customer's name and phone number Row-level security switched on, with a policy so users see only their own bookings
Key search A Stripe secret key in a front-end file Key moved to an edge function, old key revoked in Stripe
Login A custom password reset the AI had written Replaced with Supabase Auth's own reset flow
Packages Two outdated dependencies with known issues Updated, then the app retested
Forms No server-side validation on the contact form Validation and spam protection added

Each fix took between ten minutes and an hour. Together they turned an app that leaked customer data on day one into one that was reasonable to launch.

What mistakes should you avoid?

  • Asking "is this secure?" The model usually says yes. Ask about named risks instead.
  • Trusting that a policy exists. Read what each database policy allows, then test logged out.
  • Rotating nothing. A key that was ever in front-end code is compromised. Revoke it.
  • Launching payments or health data without a developer's review. The cost of a mistake is too high.
  • Never checking again. New features bring new tables, new keys and new holes.

If you've built something with AI and want a second pair of eyes before launch, a 20-minute call is enough to go through the riskiest parts together. You'll leave knowing whether it's ready, and what to fix if it isn't.

Questions people ask

Is Lovable secure?

Lovable runs on secure infrastructure, but your app's security depends on its database rules and code. CVE-2025-48757 exposed data in apps built before mid-April 2025 because row-level security policies were missing or too weak.6 Check every table yourself.

Is the Supabase anon key safe to expose?

It's designed to be public, but only safe when row-level security is on for every table. Supabase says a table in an exposed schema without it can be read and written by anyone with a grant.4

Can a vibe-coded website be hacked?

Yes, like any website. AI-built ones fail in predictable places: open databases, exposed keys and homemade logins. Escape found over 2,000 vulnerabilities across 5,600 vibe-coded apps.3 The checks above close most of them.

Do static sites built with AI need a security check?

A lighter one. Check that no keys are in the code, that forms validate on the server, and that your host sends HTTPS and security headers. Without a database or logins, the biggest risks don't apply.

How often should I check an AI-built site's security?

Before launch, after every big change the AI makes, and at least once a year. Run the package audit monthly, because new vulnerabilities in old packages appear all the time.

Sources

  1. "2025 GenAI Code Security Report," Veracode Blog, July 2025. Vendor research. veracode.com
  2. "Veracode Finds First Meaningful Gain in AI Code Security Since 2025 as Average Pass Rate Hits 62%," Veracode, 29 October 2026. Vendor research on 18 models, tasks given no security guidance. veracode.com
  3. "Methodology: How we discovered over 2k high-impact vulnerabilities in apps built with vibe coding platforms," Escape, 2025. Vendor research. escape.tech
  4. "Row Level Security," Supabase Docs. supabase.com
  5. Matt Palmer, "Statement on CVE-2025-48757," mattpalmer.io, 2025. mattpalmer.io
  6. "CVE-2025-48757," National Vulnerability Database, NIST, published 29 May 2025. nvd.nist.gov
  7. "The State of Secrets Sprawl 2026," GitGuardian, 17 March 2026. Vendor research. blog.gitguardian.com
  8. "Wiz Research Uncovers Critical Vulnerability in AI Vibe Coding platform Base44 Allowing Unauthorized Access to Private Applications," Wiz, July 2025. wiz.io
  9. "OWASP Top 10:2025," OWASP Foundation. owasp.org

Keep reading

All insights

Vibe coding a website

How it works and where it breaks.

Read the article

AI website launch checklist

Thirty checks before you go live.

Run the checks

Page weight checker

See what slows your page down.

Check a page

Build your site with AI, with help

I build the foundation with your team: the brief, the design system and the checks. Then your team runs the site with AI.

Twenty minutes and nothing to sign. The three changes are yours to keep either way.

Book a 20-minute call