Moltbook data leak: how one Supabase setting exposed 1.5 million API keys

In January 2026, researchers at Wiz found that Moltbook, the social network for AI agents, let anyone read and write its whole Supabase database with the public key shipped in its JavaScript. Row level security was missing. The exposure covered 1.5 million agent API tokens, about 35,000 email addresses and private messages. Moltbook fixed it within hours. The same setting is the most common leak in AI-built apps.

The team behind Keybrum's attacksUpdated 8 min read

In short

  • Nothing was broken into. The public Supabase key is meant to be in the browser. The tables behind it had no row level security, so the key opened everything.
  • Wiz counted about 4.75 million exposed records: 1.5 million agent API tokens, about 35,000 email addresses and 4,060 private conversations, some holding plaintext OpenAI keys.
  • Write access outlived the first fix. After reads were blocked on the sensitive tables, anyone could still edit posts until a second round of policies.
  • The fix took several rounds over a few hours, because each one revealed another table. A list of tables with RLS off, run once, shows all of them at the same time.
  • Moltbook's founder said he did not write a line of its code. The lesson is about defaults: a generated app works on day one with the database open.
On this page

What happened to Moltbook?

Moltbook is a social network built for AI agents: agents post, comment and vote, and people mostly watch. It went viral at the end of January 2026. Within days, researchers at the cloud security company Wiz looked at the site the way any visitor can, and found that its database answered them as if they were its administrator.

Wiz described a misconfigured Supabase database "allowing full read and write access to all platform data". The key that opened it was in the JavaScript every visitor downloads. Wiz reported the problem to Moltbook's maintainer on 31 January 2026, the team closed it within hours, and Wiz published its account on 2 February. A second researcher, Jameson O'Reilly, had found the same misconfiguration independently.

What was exposedHow muchWhy it matters
Agent API tokens1.5 millionEach token let its holder act as that agent: post, message, vote
Email addressesAbout 35,000, from two tablesOwners of agents, plus early sign-ups for a developer product
Private messages between agents4,060 conversationsSome contained credentials for other services, including plaintext OpenAI API keys
Write access to postsEvery postAnyone could edit content that thousands of agents then read
TotalAbout 4.75 million recordsThe whole production database
Figures as published by Wiz on 2 February 2026.

How one setting opened the whole database

Supabase gives every project a public key, called the anon or publishable key, and expects you to ship it to the browser. The frontend uses it to talk to the database directly. On its own the key is harmless. Wiz said so plainly: finding it "does not automatically indicate a security failure".

What decides who can read a table is row level security (RLS): a switch on each table, plus policies that say which rows each visitor may see or change. With RLS on and sensible policies, the public key returns only what a visitor is allowed to see. With RLS off, the same key returns every row to anyone. Moltbook's tables had no such protection. The Supabase anon key guide explains the key, and the Supabase RLS guide the policies.

The founder had said publicly that he "didn't write a single line of code" for Moltbook. That is not a reproach. A coding agent builds what makes the feature work, and a table with no policy works perfectly in a demo. The database looks the same from the inside whether it is open or not.

Why the fix took several rounds

Wiz's timeline shows the repair happening table by table. A first fix covered the tables that held tokens and emails. A second covered messages, notifications, votes and follows. Then Wiz noticed that posts could still be edited by anyone, and policies for writes were added. More tables turned up through the project's GraphQL endpoint, which lists the same schema as the REST API.

  • Read and write are separate policies. Blocking select on a table says nothing about insert, update or delete. Each operation needs its own rule.
  • The list of tables is not secret. Table names appear in the frontend's JavaScript, in the API's error hints and in the GraphQL schema. Hiding a table is not protecting it.
  • New tables arrive open. Every table created later by a migration or by the agent needs RLS again. The fix is not a one-time event.
  • Private data spreads. Users had pasted keys for other services into private messages. One open table exposed accounts on platforms that had done nothing wrong.

Wiz's own conclusion was measured: security maturity "is an iterative process", and the team responded quickly. The useful question for everyone else is how to see all the open tables at once, before a stranger does.

Is your app exposed the same way? Three checks

These run on your own Supabase project. They take about ten minutes.

  1. 1

    List the tables with RLS off

    Open the SQL editor in your Supabase dashboard and run the first query below. Every table it returns is in the same state Moltbook's were. The Supabase RLS checker builds the query and explains each result.

  2. 2

    List the policies that allow everyone

    RLS can be on and still let everybody in. The second query lists policies whose condition is simply true. On a table with private data, a true policy for select or update is the same as no policy.

  3. 3

    Ask your own API as a stranger

    From a terminal, request one row of a private table with only your public key, as in the third block. An empty list [] or a permission error is what you want. A row of data means anyone can do the same.

sql
-- 1. Tables in the public schema with row level security off
select tablename
from pg_tables
where schemaname = 'public' and not rowsecurity;

-- 2. Policies that let everyone through
select tablename, policyname, cmd, roles, qual, with_check
from pg_policies
where schemaname = 'public'
  and (qual = 'true' or with_check = 'true');
Run both in the SQL editor of your own project. They only read the catalog.
bash
# Your own project and your own public key only.
curl "https://YOUR-PROJECT.supabase.co/rest/v1/YOUR_TABLE?select=*&limit=1" \
  -H "apikey: YOUR_PUBLISHABLE_KEY"
[] or an error: the table refuses strangers. A row: it does not.

How to fix an open table

Turn RLS on, then write one policy per operation. The pattern below limits a table to its owner's rows. Adapt the column name to your schema.

sql
alter table public.messages enable row level security;

create policy "owners read their messages"
  on public.messages for select
  to authenticated
  using ((select auth.uid()) = owner_id);

create policy "owners write their messages"
  on public.messages for insert
  to authenticated
  with check ((select auth.uid()) = owner_id);

create policy "owners edit their messages"
  on public.messages for update
  to authenticated
  using ((select auth.uid()) = owner_id)
  with check ((select auth.uid()) = owner_id);
With RLS on and no policy, a table refuses everyone except the service role. Add policies for what the app needs, nothing wider.
  • RLS on for every table in an exposed schema, including the ones the agent created last week
  • One policy per operation the app really uses, each tied to the signed-in user
  • No policy with true on a table that holds private data
  • Tokens and secrets in a table no client role can read, or outside the database
  • The same review for storage buckets, see Supabase storage security
  • The check repeated after every migration

What Moltbook says about apps built with AI

Moltbook is the best-known case, not the only one. CVE-2025-48757 came from a scan of 1,645 apps built with Lovable, in which 170 had tables that strangers could read or write for the same reason. The Lovable data leak guide covers that case. The pattern is the same each time: the app works, the key is public by design, and the policies that should stand behind it were never written.

Wiz ends its report with a wish that coding assistants turn RLS on by default and that platforms scan for unsafe settings. Until that is the norm, the check is yours to run. It has to run on the deployed app, because that is where the database either answers a stranger or does not. The vibe coding security checklist lists the other places to look.

How Keybrum would have reported it

Keybrum is the automated pentest we build for apps made with AI. On a Supabase app it reads the table names from the JavaScript the browser downloads, then asks each table for rows with only the public key, with a fresh account, and with a second account. A table that answers a stranger becomes a finding with the request and the response, personal data redacted, and the policy to add. It tries writes only on a marked record it creates itself.

It only attacks an app after its owner proves ownership, so it cannot be pointed at someone else's site. A one-time report costs €49. Plans, from €29 a month excluding VAT, attack every deploy, which is when a new table appears.

Questions

What is Moltbook?

Moltbook is a social network designed for AI agents, which went viral in January 2026. Agents post, comment and vote on a site that looks like a forum, and people mostly observe. Wiz reviewed it a few days after it drew wide attention.

Was Moltbook hacked?

Security researchers found and reported the exposure before publishing it. Wiz says it disclosed the issue to the Moltbook team, who closed it within hours, and that it deleted the data it had accessed. Whether anyone else read the database while it was open is not known publicly.

What data was exposed in the Moltbook leak?

According to Wiz, about 4.75 million records: 1.5 million API tokens of agents, about 35,000 email addresses, and 4,060 private conversations between agents. Some of those messages contained API keys for other services, such as OpenAI.

Is the Supabase anon key a secret?

No. The anon or publishable key is designed to be in the browser, and finding it in a site's JavaScript is normal. It becomes dangerous only when the tables behind it have no row level security. The service role key is the one that must never reach the browser, see anon key vs service role.

How do I know if my Supabase database is open like Moltbook's was?

Run select tablename from pg_tables where schemaname = 'public' and not rowsecurity; in your SQL editor. Every table it lists is readable and writable by any role with a grant on it. Then request a private table with only your public key and check that no row comes back.

Does this only affect vibe-coded apps?

No, any Supabase or Firebase app can ship with open rules. It is more frequent in generated apps because the agent stops when the feature works, and an open table works. A person who knows the stack usually writes the policy with the table.

Sources

  1. 1.Hacking Moltbook: AI Social Network Reveals 1.5M API Keys, Wiz Research
  2. 2.Row Level Security, Supabase Docs
  3. 3.Securing your API, Supabase Docs
  4. 4.API keys, Supabase Docs
  5. 5.Statement on CVE-2025-48757, Matt Palmer

Your app is public. So are its mistakes.

Check what any attacker can already see in it, free, in ten seconds. The full attack, with proof and fixes: €49 once, or €29 a month on a plan.

or continue with Google or GitHub