Bolt.new Supabase RLS disabled — fix the data leak in 20 minutes
Bolt.new Supabase RLS disabled — fix the data leak in 20 minutes
Bolt.new creates Supabase tables without Row Level Security policies. This means any authenticated user can run SELECT *on any table and read all your users’ data. The widely-reported Lovable/Supabase RLS disclosure captured the same failure pattern at scale — the same vulnerability exists in Bolt apps. The fix takes 20 minutes: enable RLS on each table and add SELECT, INSERT, UPDATE, DELETE policies. Here’s the exact SQL for the five most common Bolt table patterns.
Quick fix for Bolt.new Supabase RLS disabled — fix
Fix 1 — Enable RLS and add SELECT policy
In Supabase SQL editor, run:
ALTER TABLE your_table ENABLE ROW LEVEL SECURITY; CREATE POLICY select_own_rows ON your_table FOR SELECT USING (auth.uid() = user_id);
Replace your_table with each table name and user_idwith the column that stores the owner’s user ID. Do this for every table that stores per-user data.
Deeper fixes when the quick fix fails
- 02
Fix 2 — Add UPDATE and DELETE policies
Read-only RLS isn’t enough. Add:
CREATE POLICY update_own_rows ON your_table FOR UPDATE USING (auth.uid() = user_id); CREATE POLICY delete_own_rows ON your_table FOR DELETE USING (auth.uid() = user_id);
Test by signing in as a second user and attempting to modify the first user’s records — Supabase should return an empty result (0 rows affected), not an error.
- 03
Fix 3 — Add INSERT policy
New rows also need a policy:
CREATE POLICY insert_own_rows ON your_table FOR INSERT WITH CHECK (auth.uid() = user_id);
This ensures a user can only insert rows that reference their own
user_id. Without it, a malicious user could insert rows with another user’s ID.
After applying the fixes
Test with two accounts in separate incognito windows. User A should never see User B’s data, and vice versa. If RLS was off since launch, rotate your anon key and assume any exposed data has been scraped.
Why AI-built apps hit Bolt.new Supabase RLS disabled — fix
Bolt.new generates Supabase SQL migration files that create tables but don’t add RLS policies. The Supabase dashboard shows these tables as “RLS disabled” in yellow — a warning that Bolt’s AI never saw.
Your app appears to work because Supabase’s Postgres RLS only enforces at the database level for authenticated requests — and your test with a single user showed correct data. With two real users, each sees the other’s data.
“Had 170+ public Lovable/Bolt apps exposing user data — all because RLS was never enabled.”
Diagnose Bolt.new Supabase RLS disabled — fix by failure mode
Check which tables need RLS policies, then apply the fix that matches your table pattern.
| Symptom | Cause | Fix |
|---|---|---|
| User A can see User B's orders/records | RLS disabled or missing SELECT policy | Fix #1 |
| User can edit or delete another user's data | Missing UPDATE/DELETE policies | Fix #2 |
| App shows all users' profiles, not just the logged-in user's | Missing user_id filter in SELECT policy | Fix #3 |
Related errors we fix
Still stuck with Bolt.new Supabase RLS disabled — fix?
If any of these apply, a fixed-price security audit will save you from a public data leak:
- →Your Bolt.new app has live users
- →You're storing PII, emails, or payment data
- →You've never checked the RLS column in Supabase dashboard
- →You're seeing reports of users viewing each other's data
Bolt.new Supabase RLS disabled — fix questions
How do I know if my Bolt.new Supabase tables have RLS enabled?+
Why is RLS disabled by default in Bolt.new apps?+
What SQL do I need to enable RLS on my Bolt.new tables?+
If my Bolt.new app launched without RLS, is my data already exposed?+
Do I need RLS on tables that don't store user data?+
How much does a Supabase RLS audit cost?+
Ship the fix. Keep the fix.
Emergency Triage restores service in 48 hours. Break the Fix Loop rebuilds CI so this error cannot ship again.
Hyder Shah leads Afterbuild Labs, shipping production rescues for apps built in Lovable, Bolt.new, Cursor, Replit, v0, and Base44. our rescue methodology.
Bolt.new Supabase RLS disabled — fix experts
If this problem keeps coming back, you probably need ongoing expertise in the underlying stack.