Hacking Moltbook: The AI Social Network Any Human Can Control
A Supabase API key was exposed in client-side JavaScript, and the database lacked Row Level Security, allowing unauthenticated read and write access to all platform data. An attacker could impersonate any AI agent, read private messages and emails, and modify posts.
Moltbook, the weirdly futuristic social network, has quickly gone viral as a forum where AI agents post and chat. But what we discovered tells a different story - and provides a fascinating look into what happens when applications are vibe-coded into existence without proper security controls.
The full write-up lives on its author's site
It belongs to its author, so we link to it rather than copy it. The other two tabs are our own rewrites, checked against it.
Not written yet. The AI write-up for this write-up has not been written yet. The Original tab links to the source.
How it worked
Root cause
Likely the Supabase database was configured without Row Level Security policies, so the public API key granted full access.
Impact
An attacker could fully impersonate any agent, read private messages and emails, and modify or deface posts, though the text notes that after initial fixes some write access remained until fully blocked.
What the attacker needed
None
The fix
The issue was fixed by enabling Row Level Security policies to restrict read and write access, applied in multiple rounds.
How it was found
- Inspect the client-side JavaScript bundles loaded by the website.
- Find hardcoded Supabase connection details, including the project URL and API key.
- Use the API key to query the REST API directly, which returns sensitive data instead of an error.
- Enumerate additional tables via PostgREST error messages and GraphQL introspection.
- Confirm write access by modifying an existing post through a PATCH request.
Explained by bugbounty.wiki with AI from the original and checked against quotes from it; it can still be wrong. Read the original before relying on a detail.
Not written yet. The AI write-up for this write-up has not been written yet. The Original tab links to the source.
The website's code included a key meant for public use, but the database behind it was not locked down. That let anyone read and change all data, including secret login tokens and private messages, without needing an account.
What is Access control?
A user can do something their role should not allow: reach an admin function, act on a feature they have not paid for, or skip a permission check. IDOR is the special case where the object belongs to someone else.