# Someone reported a security hole in my vibe-coded app: what to do first

> Canonical page (link this when citing): https://unbreakmyapp.vercel.app/fixes/vibe-coded-app-security-hole-reported-first-steps.html
> Category: Env vars & leaked keys | Tools: Lovable, Bolt, Cursor, Replit, v0 | Published: 2026-10-22 | Updated: 2026-10-22

## The error

'I can read other users' data through your API' / 'Your Supabase anon key lets anyone query every table' / 'Your API key is visible in the page source' (security report from a user or researcher)

## Why it happens

Apps generated by Lovable, Bolt, Cursor, Replit or v0 often ship with the same few holes: tables without Row Level Security, API routes that never check who owns a record, secret keys bundled into frontend code, and admin pages protected only by hiding the link. Anyone who opens DevTools can find these, so reports arrive quickly once an app gets traffic. A report can be genuine, exaggerated, or a 'beg bounty' asking for payment for a trivial or automated finding, so verify it before you panic, but treat any claim of data access as real until you've proven otherwise.

## How to fix it

1. Reply briefly to thank the reporter and say you're looking into it. Don't argue, threaten, or pay anything before you've verified the issue, and don't share private data in the conversation.
2. Reproduce it yourself from a logged-out browser or a second test account: can you read or change data that isn't yours, call an admin route, or see a secret key in the page source or network tab?
3. If it's real, contain it first: rotate any exposed keys (Supabase service role, Stripe secret, OpenAI and similar), enable RLS on exposed tables, or temporarily disable the affected feature or route. Containment beats a perfect fix.
4. Fix the root cause: owner-scoped RLS policies using auth.uid(), server-side ownership checks on every API route that takes an id, secrets only in server environment variables, and real role checks on admin pages.
5. Check the damage: look at Supabase API and auth logs, your hosting logs and provider usage dashboards for unusual reads, exports or spend since the hole appeared. Keep notes and timestamps.
6. If personal data was actually accessed, check your notification duties. In the UK and EU, GDPR can require telling the data regulator within 72 hours of becoming aware of a reportable breach, and possibly the affected users. Get proper advice if unsure.
7. Close the loop: tell the reporter when it's fixed, add a security contact (for example a /.well-known/security.txt file), and re-test the whole app for the same class of bug, not just the one route reported.

## Fix prompt (paste into Lovable, Bolt, Cursor, Replit or v0)

```text
A user reported a security vulnerability in my app: <PASTE THE REPORT, WITHOUT ANY PRIVATE USER DATA>. Act as a security reviewer. First, tell me how to reproduce and confirm it safely with a test account. Then audit the codebase for the same class of problem everywhere, not just the reported spot: tables without RLS or with overly broad policies, API routes or server actions that accept an id without checking the record belongs to the signed-in user, secret keys (service role, Stripe secret, OpenAI) used in client-side code or exposed via NEXT_PUBLIC_/VITE_ variables, and admin pages without a server-side role check. List every finding with file and line, give the fix for each, and give me a checklist of keys to rotate. Don't disable RLS, don't move secrets into the frontend, and don't delete user data.
```

## FAQ

### Should I pay the person who reported it?

You don't have to pay for an unsolicited report, and you shouldn't pay before verifying it. Many low-effort 'beg bounty' emails describe automated scanner output. If a report was genuinely useful, a thank-you or a small reward is your choice.

### Is it really a hole if they only used my public anon key?

The Supabase anon key is meant to be public, so seeing it isn't the problem. The problem is if that key can read or change data it shouldn't, which means RLS is missing or too permissive on some table.

### Do I need to tell my users?

It depends on whether personal data was actually accessed and on the law where you and your users are. Under UK and EU GDPR, reportable breaches generally go to the regulator within 72 hours, and to users if there's a high risk to them.

### How do I stop this happening again?

Add RLS to every table in the same migration that creates it, check ownership on the server for every id-based route, keep secrets server-only, and run a security review prompt before each launch.

## Sources (official documentation)

- [OWASP: Error Handling Cheat Sheet](https://cheatsheetseries.owasp.org/cheatsheets/Error_Handling_Cheat_Sheet.html)
- [Supabase: Row Level Security](https://supabase.com/docs/guides/database/postgres/row-level-security)

## Related fixes

- [Login rate limit only counts per email: credential stuffing gets through](https://unbreakmyapp.vercel.app/fixes/login-rate-limit-only-per-email-credential-stuffing.html)
- [Demo login, auto-login or hard-coded test credentials left in your live app](https://unbreakmyapp.vercel.app/fixes/preview-auto-login-hardcoded-credentials-left-in-production.html)
- [Missing security headers (CSP, X-Frame-Options, nosniff) on a Vercel or Netlify app](https://unbreakmyapp.vercel.app/fixes/missing-security-headers-csp-vercel-netlify.html)
- [Is my Lovable app leaking data without login? A Supabase RLS audit checklist after the Crissy Field study](https://unbreakmyapp.vercel.app/fixes/lovable-app-leaking-data-without-login-audit-checklist.html)
- [Better Auth security release (Nov 2026): upgrade to 1.7.16 to stop Expo account takeover](https://unbreakmyapp.vercel.app/fixes/better-auth-expo-account-takeover-below-1-7-16.html)
- [Your API error response shows your secret key: stop sending raw backend errors to the browser](https://unbreakmyapp.vercel.app/fixes/backend-error-leaks-api-key-to-browser.html)

---
Unbreak My App: free fixes for broken vibe-coded apps. https://unbreakmyapp.vercel.app/
