Launch and other stacks
Security risks of vibe-coded apps, with data
The most serious risk PatchLabs has measured in vibe-coded apps is a database the wrong people can read. In the PatchLabs lab study (Nov 2026, re-checked 24 Nov 2026) of 318 public Lovable and Supabase apps, 97 (31%) did: 65 were readable by anyone with the public key and 32 by anyone who signs up. After removing businesses’ own public contact details, about 1 in 4 (25–27%) exposed real personal data.
TL;DR
- The measured risk is data exposure: 97 of 318 apps (31%) on our 24 Nov 2026 re-check, about 1 in 4 after removing false alarms.
- The cause is a handful of access-rule patterns, each with a finding page: RLS never switched on, read rules that say yes to everyone, and read rules that only check “signed in”.
- Other common risks are secret keys in code, open server functions, self-made admins and weak HTTPS. We list them with finding IDs but have no study numbers for them.
- Every risk here can be checked with a free tool or a short test.
How common are security flaws in vibe-coded apps?
PatchLabs sampled 500 public GitHub repos with a Lovable and Supabase project layout, and rebuilt each app’s database from its own migrations in a disposable lab. We then read the copy as an anonymous visitor and as a signed-in stranger who owns none of the rows. Here is what came out, with the leak counts from our 24 Nov 2026 re-check of the apps flagged in the first run. The 318 base is from 5 Nov 2026; on 24 Nov we re-checked the 106 flagged repos with our stricter probe: 97 still leak, none was fixed by its owner, 2 repos were deleted and the other 7 no longer show a readable test row (in 5 of them our test row could not be inserted).
| Stage | Apps | Share of 318 |
|---|---|---|
| Public repos sampled | 500 | n/a |
| Run through the lab | 436 | n/a |
| Migrations built a working database | 318 | 100% |
| Flagged in the first run (5 Nov 2026) | 106 | 33% |
| Personal data readable by the wrong people (24 Nov 2026 re-check) | 97 | 31% |
| …by anyone with the public key | 65 | 20% |
| …only by people who sign up | 32 | 10% |
| Real exposure after removing businesses’ own public contact details | about 1 in 4 | 25–27% |
Source: PatchLabs lab study, Nov 2026. The full report has the data and methodology. The 118 repos that did not build are excluded, not counted as safe.
Limits. The study used public Lovable and Supabase repos only, and tested read access to personal data. It says nothing about private repos, other stacks or other kinds of flaw, and it does not show that these apps are worse than hand-written ones. No app is named.
Why do AI app builders produce these flaws?
An AI builder aims to make the app work first. When a page fails with a permissions error, the quickest way to clear it is to loosen a rule, and a loosened rule can open the whole table. The study also found that leaks are not limited to the users table. Apps exposed the people their users deal with, such as suppliers, staff and sellers, and logs of private conversations.
A second pattern is a third of the leaks needing a sign-up. If an app lets anyone create an account, “signed in” is not a boundary, and tests run only as a logged-out visitor miss those 32 apps.
What are the top security risks of vibe-coded apps?
Ordered by how directly they expose data. Only the first three were measured in the study.
| Risk | What goes wrong | Finding |
|---|---|---|
| 1. Row level security never switched on | The public key can read and change the whole table. | PL-008 |
| 2. Read rules that say yes to everyone | Logged-out visitors read personal data, usually after a rule was loosened to fix an error. | PL-001, PL-005 |
| 3. Read rules that only check “signed in” | Anyone who signs up reads every row. | PL-002 |
| 4. Writes open to strangers | Anyone who signs up edits or deletes other people’s rows, or edits their own role. | PL-012, PL-004 |
| 5. Self-made admins | Roles in a column users can edit, in user_metadata, or checked only in the browser. | PL-013, PL-019, PL-020 |
| 6. Secret keys in code | AI, payment or service_role keys in the repo, the bundle or git history. | PL-009, PL-010, PL-011 |
| 7. Open server functions | Functions that skip the sign-in check, trust a user id from the request, or allow any website to call them. | PL-017, PL-022, PL-026 |
| 8. Unverified payment webhooks | Anyone can post a fake “paid” event. | PL-021 |
| 9. Files, views and Realtime | Public buckets, loose storage policies, views that skip RLS, private rows streamed to subscribers. | PL-007, PL-015, PL-014, PL-016 |
| 10. Sign-ups without email confirmation | Accounts with addresses nobody owns. | PL-018 |
| 11. Risky code | Dependencies with known vulnerabilities, user content rendered as raw HTML. | PL-023, PL-024 |
| 12. Weak HTTPS and headers | No forced HTTPS, no HSTS or CSP, cookies without flags. See security headers. | PL-027 to PL-036 |
The first three are the same pattern seen from three sides: who the rule says yes to. RLS policies explained shows each one in SQL.
How do I find out which risks apply to my app?
- Run the free RLS check on a public repo. It reads the migrations and flags tables that are open (risks 1 to 4).
- Paste your code into the key check to find secret keys (risk 6). It runs in your browser.
- Grade your live home page with the headers check (risk 12).
- Test as a stranger. Follow the three-identity script or the 10-minute Lovable check.
- Work through the pre-launch checklist for the rest.
Questions people ask
What is the biggest security risk in a vibe-coded app?
In PatchLabs’ lab study, it was data exposure. 97 of 318 public Lovable and Supabase apps (31%) let the wrong people read personal data on our 24 Nov 2026 re-check, and about 1 in 4 exposed real personal data once false alarms were removed.
Are vibe-coded apps less secure than hand-written ones?
We cannot say. The study sampled public Lovable and Supabase repos and did not compare them with hand-written apps. It shows how often this stack leaks, not how it ranks against others.
Why does “signed in” not mean “safe”?
If anyone can create an account, a stranger can sign up with a throwaway email. In the study, 32 of 318 apps (10%) leaked only to signed-in users (24 Nov 2026 re-check). See PL-002.
Does a green security scan mean my app is safe?
It means the checks that scan runs found nothing. Read builder scan vs independent check for what a scan can and cannot tell you.
Does PatchLabs name the apps it found leaking?
No. The study used public code only, no app is named, and nothing here implies that any real app, company or repo has a flaw.
Sources
- PatchLabs lab study, Nov 2026: the 1-in-4 report (checked 11 Nov 2026)
- PatchLabs: study methodology (checked 11 Nov 2026)
Related findings
The checks behind this guide, each with example code, a self-check and the fix.
Row level security not enabled
PL-001Anonymous visitor can read personal data
PL-002Any signed-in user can read every row
PL-012 · comingStrangers can change or delete other people's rows
PL-010Service role key in client code
PL-017Edge function open without sign-in while using the service key
Free check
Check your app for this, free.
Paste your public repo. PatchLabs rebuilds your database from its migrations, tests it as a visitor, a stranger and the owner, reads the code for keys and risky patterns, and hands you the fix.
Written by Manraj Singh Dhillon. Last checked 11 Nov 2026. Code samples are synthetic and run against your own project; nothing here names a real app. Spotted a mistake? Tell us.