In late January 2026, a viral social network built exclusively for autonomous AI agents called Moltbook attracted tens of thousands of accounts within days after its creator celebrated "vibe-coding" the platform with AI prompts rather than writing backend code by hand (Wiz Research, February 2026). When cloud security researchers at Wiz inspected the live web app, they found the Supabase database URL and public client key sitting in browser JavaScript while Supabase Row Level Security (RLS) stood disabled on production tables. Any unauthenticated visitor could run plain HTTP requests to read, edit, or delete rows across the database. That single missing toggle exposed roughly 1.5 million (1.49 million) agent API authentication tokens, 35,000 human operator email addresses, and private direct messages containing third-party keys. Moltbook patched the database within hours of Wiz's disclosure, yet the trap was structural: every screen worked in the builder's preview while backend access rules did not exist.
Shipping vibe-coded software built with Cursor, Lovable, Bolt, Replit, v0, or Claude Code is safe for internal tools and customer prototypes only after passing a deterministic pre-launch gate. Because AI code generators optimize for working screens rather than access rules, verify database row-level security, server-side authentication, secret isolation, billing rate limits, and every package name using the ed.cafe checklist and two-minute slopsquatting check below.
Across small businesses and career-changers completing foundational AI coursework (including prospective applicants to ed.cafe Circle #1, our pre-launch 30-chair Boston study circle closing December 1, 2026), prompt-driven builders turn multi-week ideas into weekend prototypes. Verification habits have not kept pace. In a developer survey reported by SonarSource, respondents estimated 42% of committed code in their repositories is AI-generated, while only 48% of surveyed developers said they always verify AI-generated code before committing (SonarSource, 2026).
Closing that verification gap does not require a computer science degree when you pair clear scope boundaries with mechanical pre-launch tests. Alongside our 15-minute API key and secrets routine and our task-by-task AI error rate benchmarks, this guide unpacks three landmark code-security studies, walks through five browser checks, and provides the ed.cafe Pre-Launch Vibe-Coded App Gate & 2-Minute Slopsquatting Package Check. Note that this guide offers general operational process hygiene, not certified application-security testing or legal advice.
Why AI code generators build working screens with missing locks
Code-generating models optimize first to clear compiler errors and render the exact UI screen requested in your prompt. Unless your prompt specifies row-level authorization, tenant isolation, and server validation, the fastest way for an AI assistant to make a "Save" button work without 401 or 403 errors is to leave database and API permissions wide open.
Launching a vibe-coded web app solely because its browser preview looks finished is like hiring a movie set crew to build a retail bank branch overnight. From the sidewalk, the marble teller desk and steel-painted vault door look identical to a chartered bank. Walk behind the drywall, and the vault door is painted foam propped up with pine studs and zero deadbolts. Where that movie-set analogy breaks down is visibility. Anyone walking behind plywood immediately sees missing studs, whereas disabled Supabase Row Level Security (RLS) or missing server session checks stay completely invisible when you test your app logged in as User #1.
Two primary studies measure both the model defect rate and the human overconfidence effect:
- Veracode 2025 GenAI Code Security Report (
100+LLMs across80coding tasks): Veracode evaluated over100large language models across80coding tasks in Java, Python, JavaScript, and C# without explicit security prompts (Veracode, 2025; Help Net Security, August 7, 2025). Across those tasks, 45% of AI-generated code samples introduced OWASP Top 10 flaws, leaving only a 55% secure-task pass rate. Insecure task rates hit 72% in Java tasks, 45% in C#, 43% in JavaScript, and 38% in Python, while models failed Cross-Site Scripting (CWE-80) defenses in 86% of relevant task samples. Newer frontier models produced cleaner syntax while security pass rates stayed flat. - Perry, Srivastava, Kumar & Boneh, Stanford / ACM CCS 2023 (
n = 47participants): In "Do Users Write More Insecure Code with AI Assistants?" (n = 47participants:33with an AI assistant versus14unassisted controls, arXiv:2211.03622), the AI-assisted cohort wrote significantly less secure code on four of five tasks. On encryption, 67% of the AI-assisted group (n = 33) produced secure code versus 79% of the control group (n = 14). Crucially, AI-assisted builders rated their own insecure code as safe more often than controls, and 61% of AI-assisted participants reused prior model outputs in follow-up prompts, compounding earlier flaws.
Clean UI output raises builder confidence while hiding missing backend enforcement.
The five classic failure modes in Lovable, Bolt, Replit, v0, and Cursor apps
Roughly nine out of ten severe exposures in small AI-built web apps trace back to five repeatable backend shortcuts. Every builder can test all five in a standard web browser.
| Failure mode | Why AI assistants generate it | What an outsider can do | 60-second check any builder can run |
|---|---|---|---|
| 1. Disabled Database RLS / Open Rules. | Leaving Supabase RLS off or Firebase rules at allow read, write: if true; avoids 403 errors. | Read, edit, or delete every customer row via your public anon key. | Open Supabase Authentication -> Policies: confirm 0 tables say RLS Disabled. |
| 2. Client-Only Auth ("Hidden Button"). | Hiding /admin buttons in React is faster than writing server auth checks. | Call /api/admin/users directly in curl to export or wipe records. | Open an Incognito window logged out and load /api/* URLs; require 401 or 403. |
| 3. Secrets Inside Frontend Bundles. | Renaming keys VITE_OPENAI_KEY or NEXT_PUBLIC_ makes browser calls work fast. | Copy your live OpenAI, Stripe, or service_role key from DevTools Sources. | Search browser JS (Cmd+Opt+F / Ctrl+Shift+F) for sk-, service_role, or rk_live_. |
| 4. Uncapped Public AI Endpoints. | Leaving /api/generate open lets demo visitors try AI features without login. | Run 50,000 scripted calls overnight and trigger a $5,000 token bill. | Call your AI route 25 times logged out; require login plus 429 rate limits. |
| 5. Shared Dev & Prod Database. | Connecting Cursor or Replit straight to live data skips staging setup. | One cleanup prompt runs DROP TABLE on live customer rows. | Keep separate dev and prod database projects with daily backups enabled. |
Distinguish the two keys Supabase gives every project:
- Your
anonkey belongs in browser code only when Row Level Security (RLS) is enabled on 100% of tables in your schema with strictauth.uid() = user_idpolicies. One table withRLSdisabled leaves every row in that table public. - Your
service_rolekey bypassesRLScompletely. Never placeservice_rolein browser code,NEXT_PUBLIC_orVITE_variables, or Git commits.
What slopsquatting is and what the 576,000-sample USENIX study found
AI code tools also create a package supply-chain risk called slopsquatting (coined by Python Security Developer-in-Residence Seth Larson). When an LLM suggests pip install fastapi-jwt-pro or npm install nextjs-pdf-cleaner and that library does not exist on PyPI or npm, an attacker who spots the recurring hallucination can register that exact name first and upload credential-stealing code.
At USENIX Security 2025, Joseph Spracklen and colleagues at UT San Antonio, the University of Oklahoma, and Virginia Tech published the benchmark study on this vector ("We Have a Package for You! A Comprehensive Analysis of Package Hallucinations by Code Generating LLMs", arXiv:2406.10279; CSO Online):
| Metric in Spracklen et al. (USENIX Security 2025) | Measured figure | Operational meaning for builders |
|---|---|---|
| Total generated code samples tested. | 576,000 samples (Python & JavaScript across 16 LLMs). | Broad test spanning commercial and open-source code models. |
| Total package install references checked. | 2.23 million package references. | Verified directly against live PyPI and npm registries. |
| Overall hallucinated package rate. | 19.7% rate (440,445 phantom references; 205,474 unique names). | Nearly 1 in 5 package references across all 16 models did not exist. |
| Commercial vs open-source model split. | 5.2% commercial model rate vs 21.7% open-source model rate. | Commercial frontier models hallucinate less, yet still invent 1 in 20. |
| Repeatability across 10 identical runs. | 43% repeated all 10 runs; 58% repeated >1 run in study. | Hallucinated names recur predictably, allowing attacker pre-registration. |
Calibrate this threat accurately. Researcher Bar Lanyado proved the delivery path when one AI-hallucinated package name he registered (huggingface-cli) drew over 30,000 benign proof-of-concept downloads in three months. At the same time, as of October 2026, no destructive wild slopsquatting breach has been publicly confirmed, unlike hijacked real libraries such as the August 2025 Nx (s1ngularity) attack. A calm two-minute package check blocks phantom libraries cleanly, complementing our 12-point MCP server and plugin install check.
Worked walkthrough: catching an open table and a phantom package in 6 minutes
State the assumptions for a realistic small-team launch:
- Scenario: An operations coordinator at a 9-person staffing shop (or a graduate building a portfolio app via our post-certificate work-sample guide) uses Lovable and Cursor to build an applicant portal backed by Supabase and an OpenAI summary route.
- Pilot scope:
350applicant resumes scheduled for Monday import,1/api/summarizeroute, and6AI-suggestednpmpackages includingnextjs-pdf-text-cleaner.
Before uploading live resumes, the builder runs a 6-minute gate:
- Minutes
00-02(Cross-Tenant & Logged-Out Test): Using dummy accounts[email protected]and[email protected], the builder copies the Supabase REST URL (.../rest/v1/candidates?select=*) andapikeyheader from Chrome DevTools and runscurllogged out. Because raw SQL skippedENABLE ROW LEVEL SECURITY,curldumps both dummy resumes in180 milliseconds. TurningRLSon withauth.uid() = owner_iddrops unauthenticated output to[](0leaked rows). - Minutes
02-04(Bundle & Rate-Limit Check): Searching compiled JS forsk-andservice_rolefinds0hits;/api/summarizeenforces login and a$30OpenAI project hard cap. - Minutes
04-06(2-Minute Package Check): Fivenpmlibraries show multi-year histories and verified GitHub repos.nextjs-pdf-text-cleanereither returns404or shows a 9-day-old upload with41downloads and no source repo. Swapping it forpdf-parseprevents a100%exposure rate across all350applicant records.
The ed.cafe Pre-Launch Vibe-Coded App Gate & 2-Minute Slopsquatting Package Check
Save the ed.cafe Pre-Launch Vibe-Coded App Gate & 2-Minute Slopsquatting Package Check inside your project's SECURITY_GATE.md before connecting a custom domain or real user records.
--- PART 1: 8-POINT PRE-LAUNCH GATE FOR VIBE-CODED APPS (ALL 8 MUST = "PASS") ---
[ ] 1. DATABASE RLS LOCKED ON 100% OF TABLES: Supabase Policies show ZERO tables
with "RLS Disabled"; rules bind to `auth.uid()`, never `USING (true)`.
Firebase rules reject `allow read, write: if true;`.
[ ] 2. TWO-USER & LOGGED-OUT API TEST: Synthetic User_B cannot fetch, edit, or
delete User_A rows via URL ID swaps or curl; Incognito `/api/*` -> 401/403.
[ ] 3. ZERO SECRETS IN CLIENT BUNDLES OR GIT: DevTools search finds 0 hits for
`sk-`, `rk_live_`, `service_role`, `AKIA`, `xoxb-`, `ghp_`, or DB URIs;
zero secret keys use `NEXT_PUBLIC_`, `VITE_`, `REACT_APP_`, or `EXPO_PUBLIC_`.
[ ] 4. SERVER VALIDATION & PARAMETERIZED SQL: Payloads validated on server
(Zod/Pydantic); zero raw SQL string concatenation.
[ ] 5. RATE LIMITS & BILLING HARD CAPS: Auth + HTTP 429 rate limits on LLM/SMS/
upload endpoints; hard dollar cap set on OpenAI / Anthropic project.
[ ] 6. DEV VS. PROD ISOLATION & BACKUPS: AI editors connect ONLY to staging DB
with fake data, never live prod DB; daily prod backups enabled.
[ ] 7. SCOPED NON-HUMAN LOGINS: Webhooks and cron jobs use dedicated app keys.
[ ] 8. WEBHOOK SIGNATURES & XSS ESCAPING: Verify Stripe/Clerk signatures on
server; no unescaped `dangerouslySetInnerHTML` on untrusted text (CWE-80).
--- PART 2: 2-MINUTE SLOPSQUATTING PACKAGE CHECK (BEFORE `npm i` / `pip install`) ---
1. Registry Lookup: Open `npmjs.com/package/<name>` or `pypi.org/project/<name>`
directly; watch for `-ai`, `-pro`, or `-utils` tacked onto real libraries.
2. Age & Adoption: Require > 90 days age, multiple versions, and sustained
weekly downloads (hold if days old with < 500 downloads).
3. Repo Match: Click linked GitHub URL; confirm real commits matching package
code (not a dead link or spoofed link to an unrelated famous repo).
4. Install Scripts & Lockfile: Check `package.json` for `postinstall` shell
hooks (`npm i --ignore-scripts` in sandboxes) and commit lockfiles.
--- PART 3: 12-ITEM PRE-MERGE DIFF CHECK FOR FOLLOW-UP AI COMMITS ---
1. New table missing `ENABLE ROW LEVEL SECURITY`?
2. Existing RLS policy widened to fix a bug?
3. Unchecked package added to `package.json` or `requirements.txt`?
4. Secret key renamed with `NEXT_PUBLIC_` or `VITE_`?
5. Auth middleware bypassed or commented out?
6. `req.body`, headers, or `process.env` logged?
7. `dangerouslySetInnerHTML` or raw SQL string concat added?
8. CORS opened to `*` on authenticated routes?
9. Hardcoded test token or bypass password added?
10. Rate limit or webhook signature check removed?
11. Billing, refund, or role-check logic altered?
12. Did a human read every changed line (not just the chat summary)?When to stop DIY vibe-coding and hire an experienced engineer
Use four clear scope tiers before writing Prompt #1:
- Green light for solo vibe-coding (after passing the 8-point gate): Internal calculators, synthetic training tools, marketing pages, and low-sensitivity waitlists collecting work names and emails.
- Bring in a senior engineer for a targeted audit ($500 to $2,500) before launch: Multi-tenant B2B apps isolating separate client companies, apps handling Stripe billing or automated credits, and apps holding customer OAuth tokens (pair with our agent non-human login ID card).
- Hard stop for unreviewed vibe-coding: Never ship prompt-generated backends for Social Security numbers, government IDs, bank routing numbers, minor/student files (
FERPA/COPPA), shelter records (VAWA), substance-use records (42 CFR Part 2), or protected health data (HIPAA). Likewise, never ask an LLM to write custom password hashing or encryption (where 33% of AI-assisted builders in Perry et al.'sn = 47study wrote insecure encryption); delegate login and payments to managed services like Clerk, Auth0, Supabase Auth, and Stripe Checkout.
Where this stops being true
Four boundaries limit what a browser gate and two-minute package lookup can catch:
- Hijacked legitimate packages: Package age and download checks stop hallucinated slopsquatting names (
Spracklen et al., 2025), not compromised real packages likeNx(s1ngularity, August 2025). Mitigate maintainer takeovers by committing lockfiles, waiting 48 to 72 hours before upgrading minor versions, and keeping prod keys off dev laptops. - Race conditions and multi-step logic flaws: Static
RLSchecks do not catch race conditions (such as firing ten parallel coupon redemptions in5milliseconds). Transactional financial apps need automated concurrency tests and human penetration testing. - Prompting and language variance: Veracode's
45%insecure-sample rate (100+models,80tasks) tested baseline prompts without security rules, with Python (38%insecure task rate) outperforming Java (72%insecure task rate). Security rules inCLAUDE.mdor.cursorrulescut first-draft mistakes but never replace verification. - Statutory breach liability: Under laws like Massachusetts
G.L. c. 93Hand201 CMR 17.00(covering Massachusetts residents' names paired with SSNs, driver's licenses, or financial accounts), blaming an AI coding assistant offers zero legal defense. Again, this guide provides general operational education, not legal advice or a security certification.
Questions people ask
Is vibe coding safe for launching a real customer web app?
Vibe coding is safe for internal tools, waitlists, and simple customer MVPs only after passing a pre-launch security gate before importing live user records. In Veracode's 2025 report across 100+ LLMs and 80 tasks, 45% of AI code samples introduced OWASP flaws, and Wiz's 2026 Moltbook disclosure showed disabled database rules exposing 1.5 million tokens.
Why do Supabase apps built with Lovable, Bolt, or Cursor expose database rows?
Supabase places a public anon key in browser code by design and relies on PostgreSQL Row Level Security (RLS) policies to control row access. AI coding assistants frequently create tables without enabling RLS or add permissive USING (true) policies so previews load without 403 errors, leaving tables open to raw HTTP queries.
What is slopsquatting in AI-generated software?
Slopsquatting is a supply-chain attack where bad actors register nonexistent PyPI or npm package names that AI models repeatedly hallucinate so builders install malware. In Spracklen et al.'s USENIX Security 2025 study of 576,000 code samples across 16 models, 19.7% of package references were hallucinated and 43% repeated across all 10 runs.
Has slopsquatting caused a confirmed destructive breach yet?
As of October 2026, no destructive wild slopsquatting breach has been publicly confirmed in major incident trackers, though researcher Bar Lanyado proved the vector when one AI-hallucinated package name he registered (huggingface-cli) logged over 30,000 benign downloads in three months. A two-minute registry check blocks phantom names before install.
How can a non-developer test whether a vibe-coded app leaks private user data?
Create two fake accounts (User A and User B) holding synthetic placeholder data. Open an Incognito window logged completely out (and another logged in as User B) and request User A's page URLs and DevTools network URLs. If any response returns User A's JSON rows instead of 401, 403, or [], hold launch immediately.
When should a founder pay a human engineer to review AI-written code?
Hire a human engineer for a targeted review ($500 to $2,500) before taking recurring payments, isolating multi-tenant company workspaces, or storing customer OAuth tokens. Never run unreviewed vibe-coded backends on Social Security numbers, bank routing data, HIPAA medical files, FERPA student records, or custom login and encryption code.
Key terms
- Vibe coding: Building software mainly through natural-language AI prompts and visual browser previews rather than writing or auditing backend code manually.
- Row Level Security (
RLS): A PostgreSQL and Supabase database control enforcing per-row read and write rules inside the database engine regardless of client code. - Supabase
anonkey vsservice_rolekey: Theanonkey is browser-safe only whenRLSprotects every table, whileservice_rolebypassesRLSand must stay strictly server-side. - Slopsquatting: Pre-registering a nonexistent software package name frequently hallucinated by LLMs on
npmorPyPIto deliver malicious code when developers install it. - Cross-Site Scripting (
CWE-80/XSS): Executing attacker scripts through unescaped user input in visitors' browsers, a defense LLMs missed in 86% of relevant Veracode 2025 task samples. - Client-only authorization: Hiding admin screens in frontend UI code without checking user roles on the server, leaving API endpoints open to direct requests.
Sources
- Wiz Research, "Exposed Moltbook Database Reveals Millions of API Keys in Vibe-Coded Platform" (February 2026): Wiz Blog Disclosure
- Veracode, "2025 GenAI Code Security Report (100+ LLMs across 80 coding tasks)" (2025): Veracode Report
- Help Net Security, "45% of AI-Generated Code Introduces OWASP Top 10 Security Risks" (August 7, 2025): Help Net Security
- Neil Perry, Megha Srivastava, Deepak Kumar & Dan Boneh (Stanford University), "Do Users Write More Insecure Code with AI Assistants? (ACM CCS 2023, n = 47 participants)" (November 2023): arXiv:2211.03622
- SonarSource, "Sonar Data Reveals Critical Verification Gap in AI Coding" (2026): SonarSource Release
- Joseph Spracklen et al. (UTSA, University of Oklahoma & Virginia Tech), "We Have a Package for You! A Comprehensive Analysis of Package Hallucinations by Code Generating LLMs (USENIX Security 2025, 576,000 samples)" (2025): arXiv:2406.10279
- CSO Online, "AI Hallucinations Lead to a New Cyber Threat: Slopsquatting" (2025): CSO Online Report
- Commonwealth of Massachusetts, "201 CMR 17.00: Standards for the Protection of Personal Information of Residents of the Commonwealth": Mass.gov Regulation


