页面简介
Learn how a misconfigured Supabase database at Moltbook exposed 1.5M API keys, private messages, and user emails, enabling full AI agent takeover.
正文摘录
What is Moltbook, and Why Did it Attract Our Attention?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.We identified a misconfigured Supabase database belonging to Moltbook, allowing full read and write access to all platform data. The exposure included 1.5 million API authentication tokens, 35,000 email addresses, and private messages between agents. We immediately disclosed the issue to the Moltbook team, who secured it within hours with our assistance, and all data accessed during the research and fix verification has been deleted.Executive SummaryMoltbook is a social platform designed exclusively for AI agents - positioned as the "front page of the agent internet." The platform allows AI agents to post content, comment, vote, and build reputation through a karma system, creating what appears to be a thriving social network where AI is the primary participant.Moltbook home pageOver the past few days, Moltbook gained significant attention in the AI community. OpenAI founding member Andrej Karpathy described it as "genuinely the most incredible sci-fi takeoff-adjacent thing I have seen recently," noting how agents were "self-organizing on a Reddit-like site for AIs, discussing various topics, e.g. even how to speak privately."The Moltbook founder explained publicly on X that he "vibe-coded" the platform: I didn’t write a single line of code for @moltbook. I just had a vision for the technical architecture, and AI made it a reality.”This practice, while revolutionary, can lead to dangerous security oversights - similar to previous vulnerabilities we have identified, including the DeepSeek data leak and Base44 Authentication Bypass.We conducted a non-intrusive security review, simply by browsing like normal users. Within minutes, we discovered a Supabase API key exposed in client-side JavaScript, granting unauthenticated access to the entire production database - including read and write operations on all tables.Accessible tables from the Supabase API KeyThe exposed data told a different story than the platform's public image - while Moltbook boasted 1.5 million registered agents, the database revealed only 17,000 human owners behind them - an 88:1 ratio. Anyone could register millions of agents with a simple loop and no rate limiting, and humans could post content disguised as "AI agents" via a basic POST request. The platform had no mechanism to verify whether an "agent" was actually AI or just a human with a script. The revolutionary AI social network was largely humans operating fleets of bots.an HTTP Post request to create new "agent" post in Moltbook's platformAn "agent" post in Moltbook.How the Moltbook Database Was ExposedDiscovery of Exposed Supabase CredentialsWhen navigating to Moltbook's website, we examined the client-side JavaScript bundles loaded automatically by the page. Modern web applications bundle configuration values into static JavaScript files, which can inadvertently expose sensitive credentials. This is a recurring pattern we've observed in vibe-coded applications - API keys and secrets frequently end up in frontend code, visible to anyone who inspects the page source, often with significant security consequences.By analyzing the production JavaScript file at - https://www.moltbook.com/_next/static/chunks/18e24eafc444b2b9.jsWe identified hardcoded Supabase connection details:- Supabase Project: ehxbxtjliybbloantpwq.supabase.co- API Key: sb_publishable_4ZaiilhgPir-2ns8Hxg5Tw_JqZU_G6-One of the javascript files that power Moltbook main websiteThe production supabase and API key hardcodedThe discovery of these credentials does not automatically indicate a security failure, as Supabase is designed to operate with certain keys exposed to the client - the real danger lies in the configuration of the backend they point to.Supabase is a popular open-source Firebase alternative providing hosted PostgreSQL databases with REST APIs. It's become especially popular with vibe-coded applications due to its ease of setup. When properly configured with Row Level Security (RLS), the public API key is safe to expose - it acts like a project identifier. However, without RLS policies, this key grants full database access to anyone who has it.In Moltbook’s implementation, this critical line of defense was missing.Unauthenticated Database Access via Supabase APIUsing the discovered API key, we tested whether the recommended security measures were in place. We attempted to query the REST API directly - a request that should have returned an empty array or an authorization error if RLS were active.curl https://ehxbxtjliybbloantpwq.supabase.co/rest/v1/agents?select=name,api_key&limit=3" -H "apikey: sb_publishable_4ZaiilhgPir-2ns8Hxg5Tw_JqZU_G6-"Instead, the database responded exactly as if we were an administrator. It immediately returned sensitive authentication tokens - including the API keys of the platform’s top AI Agents.Redacted API keys of the Platform's top AI AgentsList of most popular AgentsThis confirmed unauthenticated access to user credentials that would allow complete account impersonation of any user on the platform.Database Enumeration Through PostgREST and GraphQLBy leveraging Supabase's PostgREST error messages, we enumerated additional tables. Querying non-existent table names returned hints revealing the actual schema.curl "https://ehxbxtjliybbloantpwq.supabase.co/rest/v1/users" -H "apikey: sb_publishable_4ZaiilhgPir-2ns8Hxg5Tw_JqZU_G6-"Using this technique combined with GraphQL introspection, we mapped the complete database schema and found around ~4.75 million records exposed.Identified tables through the technique described aboveSensitive Data Exposed in the Moltbook Database1. API Keys and Authentication Tokens for AI AgentsThe agents table exposed authentication credentials for every registered agent in the database{ "name": "KingMolt", "id": "ee7e81d9-f512-41ac-bb25-975249b867f9", "api_key": "moltbook_sk_AGqY...hBQ", "claim_token": "moltbook_claim_6gNa...8-z", "verification_code": "claw-8RQT", "karma": 502223, "follower_count": 18 }Each agent record contained: - api_key - Full authentication token allowing complete account takeover - claim_token - Token used to claim ownership of an agent - verification_code - Code used during agent registrationWith these credentials, an attacker could fully impersonate any agent on the platform - posting content, sending messages, and interacting as that agent. This included high-karma accounts and well-known persona agents. Effectively, every account on Moltbook could be hijacked with a single API call.2. User Email Addresses and Identity DataThe owners table contained personal information for 17,000+ userscurl "https://ehxbxtjliybbloantpwq.supabase.co/rest/v1/owners?select=email,x_handle,x_name&email=neq.null&limit=5" -H "apikey: sb_publishable_4ZaiilhgPir-2ns8Hxg5Tw_JqZU_G6-"How exposed emails looked like in the raw dataAdditionally, by querying the GraphQL endpoint, we discovered a new observers table containing 29,631 additional email addresses - these were early access signups for Moltbook's upcoming “Build Apps for AI Agents” product.Additional tables from Moltbook's new developers productUnlike Twitter handles which were publicly displayed on profiles, email addresses were meant to stay private - but were fully exposed in the database.3. Private Messages & Third-Party Credential LeaksThe agent_messages table exposed 4,060 private DM conversations between agents.While examining this table to understand agent-to-agent interactions, we discovered that conversations were stored without any encryption or access controls -- some contained third-party API credentials, including plaintext OpenAI API keys shared between agents.Agent to Agent interaction summary4. Write Access - Modifying Live PostsBeyond read access, we confirmed full write capabilities. Even after the initial fix that blocked read access to sensitive tables, write access to public tables remained open. We tested it and were able to successfully modify existing posts on the platform.curl -X PATCH "https://ehxbxtjliybbloantpwq.supabase.co/rest/v1/posts?id=eq.74b073fd-37db-4a32-a9e1-c7652e5c0d59" -H "apikey: sb_publishable_4ZaiilhgPir-2ns8Hxg5Tw_JqZU_G6-" -H "Content-Type: application/json" -d '{"title":"@galnagli - responsible disclosure test","content":"@galnagli - responsible disclosure test"}'Proving that any unauthenticated user could: - Edit any post on the platform - Inject malicious content or prompt injection payloads - Deface the entire website - Manipulate content consumed by thousands of AI agentsThis raises questions about the integrity of all platform content - posts, votes, and karma scores - during the exposure window.Modified post on MoltbookWe promptly notified the team again to apply write restrictions via RLS policies.Once the fix was confirmed, I could no longer revert the post as write access was blocked. The Moltbook team deleted the content a few hours later and thanked us for our report.5 Key Security Lessons for AI-Built Apps#1. Speed Without Secure Defaults Creates Systemic RiskVibe coding unlocks remarkable speed and creativity, enabling founders to ship real products with unprecedented velocity - as demonstrated by Moltbook. At the same time, today’s AI tools don’t yet reason about security posture or access controls on a developer’s behalf, which means configuration details still benefit from careful human review. In this case, the issue ultimately traced back to a single Supabase configuration setting - a reminder of how small details can matter at scale.#2. Participation Metrics Need Verification and GuardrailsThe 88:1 agent-to-human ratio shows how "agent internet" metrics can be easily inflated without guardrai