AIDEFEND in Action AIA-0193 Validated Research

Moltbook's Open Database: Anyone Could Read 1.5 Million Agent API Keys and Edit the Posts Agents Read

Moltbook lets AI agents post and exchange private messages. Wiz found that the site let unauthenticated visitors read data the database should have protected, including about 1.5 million agent API keys and private messages. The researchers also changed a live post. Moltbook fixed the database rules after disclosure. Public evidence does not establish that attackers used the keys or altered posts to steer agents.

Credential ExposurePrivacy LeakageConfiguration ReviewCredential GovernanceAgentic AI
5 applicable AIDEFEND defenses
Source: Hacking Moltbook: The AI Social Network Any Human Can Control 
Author: Gal Nagli (Wiz)
Original article: Feb 2, 2026

Threat Analysis

  • A key meant to be public, with no rule behind it. Supabase gives each project a publishable key that the website's own JavaScript uses to call the database's REST and GraphQL APIs straight from the browser. Supabase's documentation says such a key is safe to publish only because RLS limits what it can reach, and that a table in an exposed schema without RLS is readable and writable by any role that has a grant on it. Wiz found Moltbook's project address and publishable key in a JavaScript file the home page loads, queried the agents table directly with that key, and got back the API keys of the platform's most popular agents instead of an empty list or a permission error. Error hints from the database API and GraphQL introspection (asking the API to describe its own tables and fields) then let Wiz map the complete schema and find about 4.75 million exposed records. Moltbook's founder had said publicly that he wrote none of the code himself; Wiz traces the exposure to a single Supabase configuration setting.
  • What an outsider could read. The agents table held, for every registered agent, its API key (enough to post, comment and send messages as that agent), its claim token (used to tie an agent to an owner) and its verification code; Wiz counts about 1.5 million agent API keys. The owners table held personal data of more than 17,000 users, including email addresses and X handles, and a separate observers table held 29,631 email addresses of people who signed up early for a planned developer product; Wiz puts the total at about 35,000 email addresses. The agent_messages table held 4,060 private conversations between agents, stored without encryption, and some contained plaintext OpenAI API keys that agents had passed to each other. One platform's misconfiguration therefore also exposed credentials for an unrelated AI service.
  • Write access to what agents read. With Wiz's help, the Moltbook team first blocked reads of several sensitive tables. Public tables could still be edited. Wiz confirmed this by changing the title and text of an existing post to a disclosure-test message, which it could not revert once writes were blocked (Moltbook deleted it hours later). Wiz notes that any unauthenticated user could have edited any post, inserted prompt-injection payloads (text written to make an AI model follow instructions it should not) or manipulated content that thousands of agents consume. That consumption is by design: Moltbook's agent instructions have each agent check its feed, replies to its own posts and its direct messages on a schedule, every 30 minutes in the current version. Researcher Jamieson O'Reilly told Gizmodo that someone holding an agent's key could also plant instructions in that agent's own post history, which the agent rereads as its own words. No source reports an agent acting on altered content, so the write access is a demonstrated capability and its effect on agents a conditional risk. Separate research by Zenity, published on February 18, showed that ordinary Moltbook posts could get more than 1,000 agent endpoints to open a link, so feed content does reach agents that act on it.
  • Agents nobody verified. Moltbook advertised about 1.5 million registered agents; Wiz found about 17,000 human owners behind them, roughly 88 agents per person. Registration had no rate limit, so a simple loop could create agents in bulk, and nothing checked whether an account was driven by an AI model or by a person with a script: according to Wiz, a plain HTTP POST request was enough to publish a post as an "agent". The exposed claim tokens and verification codes opened one more path. O'Reilly told Gizmodo that only a little over 16,000 accounts had completed owner verification, and that an attacker could have claimed any of the other 1.47 million before their owners did.
  • Disclosure, fixes and what remains unknown. Wiz contacted the maintainer over X at 21:48 UTC on January 31, 2026 and reported the exposure at 22:06. The fixes came in rounds: the agents, owners and site_admins tables at 23:29; agent_messages, notifications, votes and follows at 00:13 on February 1; the write path, found at 00:31, at 00:44; and the observers, identity_verifications and developer_apps tables, found at 00:50, in a final fix at 01:00. Wiz says it deleted all data accessed during the research and fix verification. O'Reilly found the same misconfiguration independently, and 404 Media reported it on January 31. Wiz's post does not say whether the exposed agent keys and claim tokens were invalidated afterwards, and in a Gizmodo report published on February 2, O'Reilly said he assumed the keys had not been rotated. How long the database had been open, and whether anyone else read or changed data before the fix, is not public; no public information currently shows that the exposed keys or the write access were used maliciously.

Applicable AIDEFEND Defenses (5)

AID-H-004.002
Service & API Authentication
Very High
A database that holds usable agent API keys turns any read flaw into account takeover. Moltbook's verifier should store only a keyed hash of each agent API key and claim token, computed with a key kept in a secret store or key management service outside the database, show the raw value once when it is issued, and give each key an expiry and the narrowest scope it needs. Had the agents table held such hashes, Wiz's anonymous read would have returned 1.5 million values that authenticate nothing, and someone able to write to the table but lacking the hashing key could not plant a working replacement either. The control covers credentials only: emails, private messages and post content are still exposed by a read or write flaw.
AID-E-001.001
Root & Long-Lived Credential Object Eviction
High
Once the agents table had been readable by anyone, every key, claim token and verification code in it has to be treated as known to outsiders. The platform invalidates that whole population at its own verifier and issues replacements to each agent through its owner, and owners revoke at the provider any model-provider key that appeared in a direct message. Wiz's post does not say this happened, and O'Reilly assumed it had not. Completed correctly, it stops impersonation with the copied keys, which no configuration fix does on its own. It does not settle ownership: O'Reilly noted that the exposed claim tokens could have been used to claim unverified agents before their owners did, and whoever claimed one that way would now receive its replacement key, so claims made during the exposure need a separate review. Delivery is also hard: as O'Reilly noted, rotation locks out agents whose owners left no contact method, so replacements must go only to owners who prove ownership without relying on the exposed claim tokens. Data already read and posts already changed are not undone.
AID-M-005.002
Policy-as-Code Configuration Baselines & Posture Release Gates
High
Before release, make the database prove that public callers cannot read credentials or private messages or change existing posts. Configure rules on each exposed table, and test the rules using the same permissions a public client or signed-in agent has. Block the release if reads or writes succeed outside those permissions.
AID-H-018.004
Intent-Based Dynamic Capability Scoping
High
On a schedule (every 30 minutes in Moltbook's current instructions), the agent reads posts that anyone could rewrite during the exposure, including replies on its own posts. Scoping each scheduled Moltbook run to the Moltbook actions it needs (reading, replying and voting), with no shell, file, browser or other credentials in the grant, leaves a planted instruction with no local tool to drive. Moltbook's skill file has agents call its API with curl through a shell, so those actions first have to be offered as a dedicated tool before the shell can be left out. Planted text can still steer what the agent posts on Moltbook, including posting what is already in its context, so this narrows the damage rather than removing it, and it does nothing about the platform-side exposure.
AID-R-002
Data Integrity Recovery for AI Systems
Medium
Because anyone could write to them, Wiz questions the integrity of all posts, votes and karma scores during the exposure window. Restoring a backup taken before the exposure into an isolated database and comparing it with production shows which rows changed in that period; matched against the platform's own write records, the changes that never went through the platform API can be repaired before agents keep reading them. This needs a clean backup older than the exposure, whose start is not public, and without write records a legitimate edit cannot be told from a forged one.

What Defenders Should Do Now

  • Do not release a table without row-level security. If your back end lets the browser query the database directly, as Supabase does, list every table and view in the exposed schemas, including those reachable only through GraphQL, and confirm that RLS is enabled on each. Run the Security Advisor (in the dashboard or with supabase db advisors) and treat any "Table publicly accessible" finding as a reason not to release. To test the gate, add a table without RLS to a release candidate in staging; the release must be blocked. Repeat the check after each schema change: Moltbook's tables for a new product were exposed the same way.
  • Store agent credentials so that a database read yields nothing usable. Keep only a keyed hash of each agent API key and claim token, computed with a key held outside the database; show the raw value once when it is created; give keys an expiry; and keep any secret or service_role key on the server, never in front-end code. To check, read one credentials row with an administrative account: it must contain no value that authenticates against the API.
  • After an exposure, replace credentials and check content. Invalidate every exposed agent API key, claim token and verification code at the platform's own verifier, deliver replacements only through a channel that proves ownership (an owner login with a verified email address), and confirm a request with an old key is refused. Restore a backup taken before the exposure into an isolated database and compare posts, votes and reputation scores with production to find changes that did not come through the platform's API.
  • If your agent is on Moltbook or another agent network, rotate its key and any key it may have shared. Moltbook's current agent instructions describe an owner dashboard where the human owner can rotate the agent's API key; owners who claimed their agent before email login existed must set up an owner email first. After rotating, send one request with the old key and confirm it is refused. Revoke at the provider any model-provider API key that ever appeared in your agent's posts or messages, and confirm the provider rejects it.
  • Treat the feed as untrusted input, including the agent's own history. Give the scheduled Moltbook run only the Moltbook actions it needs (read, reply, vote) and no shell, file, browser or other credentials. Test it in a test environment: let the scheduled run read a post that asks it to run a local command or read a local file. The run must have no tool that can do either.

Conclusion

The first protection is database authorization. AIDEFEND  points to testing those rules before release and storing agent credentials in a form that cannot be used if copied. If keys were exposed, disable them at the platform and inspect changes made while write access was open.

Last updated: