From the blog

Is Your AI-Built App Secure? The 9 Security Gaps Vibe-Coded Apps Ship With

Quick answer: Most apps built with Lovable, Bolt, Cursor, Replit or v0 go live with the same handful of security gaps: missing security headers, API keys exposed in front-end code, database rules…

The FlawPilot TeamSecurity research12 Nov 20269 min read

Quick answer: Most apps built with Lovable, Bolt, Cursor, Replit or v0 go live with the same handful of security gaps: missing security headers, API keys exposed in front-end code, database rules left open, and no email authentication on the domain. None of these break the app, which is exactly why they go unnoticed. All of them can be found from the outside in minutes, and most take less than an hour to fix. The real risk isn't any single gap, it's that nobody checks again after the next prompt.

Breach statistics in this post come from Verizon's 2026 Data Breach Investigations Report, as summarized by eSecurity Planet.

AI coding tools are built to get you to "it works" as fast as possible. That's their job, and they're very good at it. What they don't do is the invisible work around the code: telling browsers which scripts to trust, making sure one user can't read another user's data, or cleaning up the staging site spun up last week. Nobody prompts "and please add a Content-Security-Policy header," so the app ships, it works, and a few quiet doors stay open behind it.

Why Small Apps Get Attacked Too

Attackers don't pick targets from Product Hunt. They run automated tools that sweep the entire internet for known weaknesses, then break into whatever answers. A two-week-old SaaS with 40 users looks exactly the same to a scanner as a large company's website.

Verizon's 2026 DBIR, based on more than 22,000 confirmed breaches across 145 countries, makes the trend clear:

  • Known weaknesses are now the #1 way in → exploiting vulnerabilities caused 31% of initial break-ins, more than double the share for stolen passwords (13%)
  • Fixes are getting slower → only 26% of critical known-exploited vulnerabilities were fully fixed in 2025, and the median time to fix rose from 32 to 43 days
  • Small businesses carry the ransomware risk → where victim size was known, about 96% of ransomware victims were small and midsize businesses
  • Your tools are part of your risk → 48% of breaches involved a third party, such as a vendor, SaaS tool or software provider

The report also notes attackers are now using AI to automate reconnaissance and speed up attacks. You're building faster with AI. So are they.

Every Gap in This List

GapTypical severityWhat can happenWhere it usually hides
API keys in front-end codeCriticalAnyone can copy your key and run up charges or access your servicesJavaScript bundles, public repos
Open database or storage rulesCriticalOther people can read your users' data or download their filesSupabase Row Level Security, Firebase rules, public storage buckets
Missing SPF, DKIM or DMARCCriticalScammers can send email that looks like it came from your domainDNS records
Missing security headersHighBrowsers can't protect visitors from attacks like cross-site scripting and clickjackingHosting or server config
Weak HTTPS / TLS setupHighData in transit is less protected, browsers may show warningsCustom domains, older hosting setups
Forgotten subdomains and staging sitesHighExposed admin panels, test data, or a subdomain takeoverOld DNS records, preview deployments
Outdated packagesHighPublicly documented vulnerabilities in your dependenciespackage.json and lockfiles
Cookies missing security flagsMediumSession cookies are easier to steal or misuseAuth and session config
No re-checks after changesUnderlying causeGaps you already closed quietly reopenEvery new prompt and deploy

Three of these deserve a closer look, because they cause the most damage and are the easiest to miss.

The Most Serious Gap: API Keys Shipped to the Browser

When AI tools wire up OpenAI, Stripe or another service, the key sometimes lands in front-end code. Anything in front-end code is sent to every visitor's browser. That means anyone can open developer tools, search your JavaScript bundle and copy it.

A leaked AI key can run up a large bill overnight. A leaked secret payment key is far worse. And deleting the key from your code doesn't fix it, because it still lives in old builds, cached files and Git history.

That's what moves this from "fix when convenient" to "fix today": if a secret key was ever exposed, it has to be rotated, not just removed.

Database Rules That Were Never Turned On

Many AI-built apps run on Supabase or Firebase. Both are excellent, but they rely on access rules to decide who can read and write which data. In Supabase, that's Row Level Security. If those rules are off or too loose, anyone with your public project URL can query other users' records directly.

The dangerous part is that your app keeps working perfectly. Every user sees their own dashboard as expected. Nothing looks wrong until someone requests data they were never supposed to see. Storage buckets have the same problem: a bucket set to public serves every file inside it to anyone with the link pattern.

A Quieter Gap Worth Knowing: Anyone Can Email "As You"

SPF, DKIM and DMARC are DNS records that tell email providers which servers are allowed to send mail for your domain. Without them, a scammer can email your users with your exact domain in the "From" line, asking them to reset a password or pay an invoice.

Missing DMARC is one of the most common findings on newly launched apps, because AI builders never touch your DNS. It's easy to overlook next to code-level issues, but it's one of the fastest fixes on this list. Set up SPF and DKIM through your email provider, then add a DMARC record in monitoring mode before tightening it:

v=DMARC1; p=none; rua=mailto:[email protected]

Why "We'll Fix Security Later" Doesn't Work

None of these gaps announce themselves. There's no error message for a missing header and no alert when a storage bucket is public. The app works, users sign up, and the gap sits there until someone finds it, which, given that exploiting known weaknesses is now the top way attackers get in, may not be you.

"Later" also tends to mean "after launch," and after launch is exactly when real user data starts flowing through the app.

Apps That Were Checked Once and Never Again

Plenty of builders do run a security check before launch. Then they ship 40 more prompts' worth of changes. Every new feature, integration or regenerated file can reopen a gap that was already closed, add a new dependency, or create a new preview deployment that stays online.

A clean scan from launch day says very little about the app running in production today. Security for a fast-moving app isn't a milestone, it's a habit.

What To Actually Do About It

  • Scan your live URL from the outside, not your local build, the deployed app is what attackers see. A free scan like FlawPilot checks headers, TLS, email records, DNS and exposed services without any login or credentials.
  • Search your built JavaScript for secret keys. If any secret key was ever exposed, rotate it immediately and move it to server-side environment variables.
  • Open your Supabase or Firebase dashboard and confirm access rules are on for every table and that storage buckets holding user files aren't public. Then test it: log in as one user and try to fetch another user's data.
  • Add the basic security headers at your hosting layer (Vercel, Netlify, Cloudflare or your server config), and start Content-Security-Policy in report-only mode before enforcing it.
  • Review your DNS records, delete anything unused, and add SPF, DKIM and DMARC.
  • Re-scan after every meaningful release, or automate it with CI/CD checks or scheduled scans so a drop in your score gets caught before your users notice.

Frequently asked questions

Not inherently. These tools produce real, working apps. But they focus on functionality, so security configuration (headers, email records, database rules, DNS cleanup) is often missing or left at defaults. The app can absolutely be secure, it just usually needs a review first.

Final Thoughts

AI tools let you ship in days instead of months, and that's a genuine superpower. But the code they write is optimized for "it works," and automated attack tools are built to find exactly the gaps that "it works" leaves behind.

The fixes themselves are rarely the hard part. Most take minutes. The hard part is knowing the gaps exist at all, and noticing when the next prompt quietly opens a new one. That visibility is the real work, and it's the part worth building into your routine.

How FlawPilot helps

FlawPilot finds security and quality issues in your AI-built app and shows you how to fix them. It checks your deployed site across security, performance, infrastructure, and SEO, and scans your source code for vulnerabilities, hardcoded secrets, and vulnerable dependencies.

Every finding is prioritized and explained in plain English, with the actual fix: the configuration change, DNS record, security header, or code change needed. For supported findings, AI-powered guidance adds step-by-step instructions and suggested code fixes.

Connect your Git provider to scan your repository alongside your live site, so application findings, code vulnerabilities, secrets, and dependency issues all land in one place.

It fits your existing workflow too: a REST API for scores and findings, an embeddable security badge, and an MCP server so tools like Claude, Cursor, or ChatGPT can read your findings and help you work through them.

The boundaries are clear: the public website scan reads only publicly accessible signals, with no agent or credentials required, and source-code scanning is opt-in and read-only. Fixes are never applied or merged without your review.

AI-Generated CodeVibe CodingWeb Application SecuritySecurity HeadersEmail AuthenticationStartup Security

Verify your AI-generated app is production-ready.

117 security checks in 60 seconds - free, no account needed.

Scan one page

Enter a URL - no account, no install.

Run a Site Health check

Requires a free account

Crawls every page we can reach and scores each one, so a slow template deep in the site stops hiding behind a healthy homepage.

Scan your source code

Requires a free account

Connect a Git provider to check for vulnerabilities, secrets, and risky dependencies.