Bologu

Lessons from Moltbook: a fully AI-built site that let anyone read and edit its database

Updated · by the Bologu team

In early 2026 Moltbook, a social network for AI agents, took off fast. Its founder said publicly that he hadn’t written a single line of code; AI built all of it. Days later, Wiz researchers found that anyone could read and modify the entire database using nothing but what was in the web page. It’s the clearest example yet of the mistake Bologu finds most often in AI-built sites.

What happened

  • Browsing like a normal user, the researchers opened the JavaScript files the site loads and found the Supabase project URL and publishable key.
  • That key is normally fine in a web page, but the database had no RLS, so the key gave read and write access to every table without logging in.
  • About 4.75 million records were exposed, including 1.5 million agent tokens (enough to impersonate any agent), about 35,000 email addresses and 4,060 private conversations, some containing OpenAI keys users had pasted in.
  • Beyond reading, they could edit other people’s posts. The first fix closed reads only; writes stayed open until a later round.

Moltbook responded quickly: every table was secured less than three hours after the first report. But it took several rounds, because each fix revealed more tables that were still open.

Five lessons

  1. The key in the page isn’t the problem; missing RLS is. Supabase’s publishable / anon key is designed to live in your web page. RLS is what keeps outsiders out. Without it, anyone with the key reaches the whole database.
  2. Every table, including ones added later. AI often creates new tables while adding features and doesn’t enable RLS on them. One forgotten table is enough for a leak.
  3. Check writes, not just reads. A correct read policy says nothing about INSERT, UPDATE and DELETE.
  4. Don’t keep secrets in tables users can read. Tokens, keys and private messages belong in tables only their owner can read, or on the server only.
  5. After fixing, test again from the outside. Use the same key that’s in your page, and try both reads and writes on every table.

Check your own site

Start with Supabase Dashboard → Advisors → Security Advisor. Fix any table marked RLS disabled right away, then try reading with the key from your page:

# Read: replace the project URL, key and table name with your own.
curl "https://<project>.supabase.co/rest/v1/<table>?select=*&limit=1" \
  -H "apikey: <anon or publishable key>"
# A row of real data back = anyone can read this table.

If real data comes back from a table that shouldn’t be public, anyone can do the same. Test writes only on a test project or on rows you created for testing.

A prompt for your AI

Audit this Supabase project the way a stranger with only the public anon key would:
1. List every table in the public schema and whether RLS is enabled on it.
2. For each table, list its policies for SELECT, INSERT, UPDATE and DELETE and say who they allow.
3. Flag any table or policy that lets anon read user data, or lets anyone write rows they don't own.
4. Write one migration that enables RLS on every table and adds owner-only policies,
   keeping public read only where the data is meant to be public.
5. Tell me which columns hold secrets or tokens, so I can move them out of user-readable tables.
Do not disable RLS anywhere to make an error go away.

Let Bologu check for you

The Deep scan uses the key in your page to try reading your tables as a stranger and tells you which ones return user data to people who aren’t logged in. (The Deep scan only reads; it never tries to write.) The Supabase account check reads every RLS policy, including write policies that allow every row, and tables that still don’t have RLS enabled.

Sources