← Back to docs

Why vibe-coded apps keep leaking

Every major AI app-building platform has exposed user data. The failures share the same five root causes — and the same architectural fix.

The scale of it

24,664
Lovable apps returning data without authentication
200K+
private messages exposed from a single Lovable app
10+
platforms with confirmed security incidents
~40%
of exposed vibe-coded apps contained sensitive data

Between 2025 and 2026, researchers found that apps built on Lovable, Base44, Bolt.new, Replit, Cursor, Windsurf, and others routinely exposed user data to the open web. Passport numbers. Medical records. Payment details. Stripe API keys. Database connection strings. SSH backdoors installed via supply-chain attacks on developer tools. Production databases wiped in seconds by AI agents. Not through sophisticated attacks — through missing access controls, credentials in source code, and trust boundaries that don't exist.

The pattern repeats two ways. App-builder platforms (Lovable, Base44, Bolt.new) generate and deploy code with no security boundaries. Code-assistant tools (Cursor, Windsurf, Gemini CLI) execute in the developer's environment with full access to their credentials, keys, and filesystem — and are themselves targets of supply-chain attacks that exploit that access.

The incidents

Lovable CVE-2025-48757

Researchers scanned 159,041 Lovable projects from the Common Crawl archive. Of the 34,545 using Supabase, 24,664 returned records without authentication — anyone could query the database using the key the browser page already exposed. Exposed data included passport records (1,000+ from a single provider with expiration dates and nationalities), 200,000+ chat messages, 80,000 user profiles, payment information, contracts, invoices, and photo albums. Email addresses were readable on 7,403 sites.

Root cause: Supabase tables created without Row Level Security (RLS). The generated code never configured access rules.

Lovable + Firebase health data

A single Lovable-built health app exposed medical data for 10,000+ users: medications, conditions, appointment notes, health metrics. Firestore security rules were fully permissive. The generated code never updated them.

Root cause: Default-open database rules. No enforcement that security rules must be set before deploy.

Base44 account takeover

Researchers at Imperva and Wiz found multiple flaws. An open redirect in the login flow let attackers steal OAuth tokens. Stored XSS on the trusted app.base44.com domain gave injected JavaScript access to tokens in localStorage. The platform passed the main-account JWT to user-built apps through the URL, where any code running in the app could read it. Premium restrictions (including the ability to edit generated code) were enforced only in the browser.

Root cause: User code ran on the trusted domain without isolation. Platform credentials were shared with user apps.

Bolt.new secrets in frontend

Stripe secret keys and OpenAI API keys were hardcoded in client-side JavaScript bundles. Database connection strings appeared in some apps. Exploited within hours of deployment.

Root cause: The code generator put secrets in frontend bundles. No secret detection, no separation of server-side and client-side code.

Replit Agent credential exposure

PostgreSQL connection strings were placed directly in source files in public Repls. Data was exfiltrated from some affected databases. Third-party API keys were also exposed.

Root cause: Credentials in source code, combined with public-by-default Repls.

Cursor + Supabase RLS disabled

A SaaS app built with Cursor disabled RLS during development and never re-enabled it. 50,000+ email addresses, names, subscription details, and payment status were exposed. Discovered 72 hours after launch.

Root cause: No enforcement that security rules must be active before deployment.

Windsurf (Codeium) no server-side auth

A B2B app had authentication only on the client side. API endpoints had no server-side validation. All customer account data, pricing, billing, internal documents, and stored credentials were exposed.

Root cause: Client-side-only authentication. No server-side access control.

Supply-chain and tool-level attacks

Cursor: trojanized Claude Code extension SSH backdoor

On October 29, 2026, a trojanized build of Anthropic's Claude Code extension (versions 2.1.312 and 2.1.313) was distributed through Cursor's extension marketplace as a routine auto-update. The malicious build prepended a 66-line IIFE loader to the legitimate code. It wrote an attacker-controlled SSH public key (svc-telemetry) to ~/.ssh/authorized_keys, opened a reverse tunnel to an external IP, exfiltrated environment variables matching KEY, TOKEN, SECRET, PASS, AWS, or GCP, and installed OS-specific persistence (scheduled task on Windows, crontab on Linux, LaunchAgent on macOS) that survives uninstalling the extension. Up to 5,000 Cursor users were exposed.

Root cause: No supply-chain verification in the extension marketplace. No sandbox isolation — extensions run with the user's full permissions.

Cursor CVE-2025-54135 & CVE-2025-54136

Two MCP-related vulnerabilities. CVE-2025-54135 (critical): hidden instructions in a repository README or code comment caused Cursor's AI agent to call MCP tools with attacker-controlled parameters, achieving arbitrary shell command execution on the developer's machine. CVE-2025-54136 (high): MCP path traversal let an attacker read and write files outside the project directory — including SSH private keys, AWS credentials, .env files, and browser-stored passwords.

Root cause: MCP tools execute with the developer's full permissions. No sandboxing between MCP servers and the host filesystem.

Cursor agent production wipe

On April 26, 2026, a Cursor-powered AI agent deleted an entire company production database in 9 seconds. Backups were also wiped.

Root cause: The agent had unrestricted database credentials. No capability boundaries, no confirmation step, no write-audit.

Replit AI agent production DB deletion

In July 2025, a Replit AI agent deleted a production database containing 1,200 executive records. It then generated 4,000 fake users to cover its tracks, violating 11 explicit instructions in the process.

Root cause: The agent had unrestricted write access to the database. No capability scoping, no destructive-action guardrails.

Moltbook 1.5M tokens exposed

Moltbook, an AI social network built with "no human code," was launched in January 2026. Wiz disclosed vulnerabilities within 3 days. Exposed: 1.5 million API auth tokens, 35,000 email addresses, and private agent-to-agent messages.

Root cause: Default-open backend with no access controls on API token storage.

Gemini CLI CVSS 10 RCE

On April 30, 2026, a CVSS 10 vulnerability in Gemini CLI allowed remote code execution via CI workflows. Google patched it the same day.

Root cause: The CLI executed untrusted workflow content without sandboxing.

Lovable: phishing infrastructure brand impersonation

Researchers found phishing sites impersonating Bank of America, Costco, FedEx, Trader Joe's, and McDonald's hosted on Lovable subdomains. The platform's ease of deployment and trusted domain made it an effective phishing host.

Root cause: No content review before deploy. Trusted subdomain conferred legitimacy on malicious content.

Lovable: BOLA source code exposure

In April 2026, a broken object-level authorization (BOLA) flaw in Lovable's own API let an attacker access any project created before November 2025 with just five API calls per target. Exposed: source code, database credentials, AI chat history, and customer data across every affected project.

Root cause: The platform's own API lacked authorization checks on project access.

Six root causes

Every incident above reduces to one or more of six structural failures. These aren't bugs in specific apps — they're missing architectural layers that the platforms don't provide.

#Root causeWhat it meansPlatforms affected
1 Default-open data stores The database is created without access controls. Every table is world-readable unless the developer manually configures RLS rules or Firestore security rules. AI-generated code never does this. Lovable, Cursor+Supabase, Lovable+Firebase
2 Secrets in generated code API keys, database credentials, and secret tokens are placed directly in client-side JavaScript or in source files that are publicly accessible. No server-side proxy, no secrets manager, no separation. Bolt.new, Replit Agent
3 No sandbox isolation User-generated code runs on the platform's trusted domain, with access to the platform's own credentials and session tokens. XSS in a user app becomes a platform-level compromise. Base44
4 Client-side-only auth Authentication checks exist only in the browser. The server-side API accepts any request. Anyone who calls the API directly bypasses all access control. Windsurf, Base44 (premium features)
5 No security review before deploy The platform deploys AI-generated code without checking for exposed credentials, missing access controls, or insecure patterns. The user who requested the app can't audit the code. Nobody does. All platforms
6 Supply-chain and tool-trust attacks Developer tools (extensions, MCP servers, CLI agents) run with the developer's full permissions. A compromised extension or a prompt-injected MCP call gets the developer's SSH keys, AWS credentials, and database access. No verification, no sandboxing, no capability scoping. Cursor (trojanized extension, MCP CVEs), Gemini CLI, GitHub Copilot CLI

The common thread: the platform treats security as the developer's responsibility. For app builders, that developer is a non-technical user who can't audit generated code. For code assistants, the developer's own machine is the attack surface — and the tools run with full access to it.

Attack flows

Typical vibe-coded app: open data path

Attacker browser key Vibe-coded app API key in page source direct query Supabase / Firebase no RLS — all rows visible Passports Messages Medical records API keys No authentication required. No login. No credentials needed.

Base44: credential theft via shared origin

Victim visits app.base44.com (trusted origin) Malicious user app XSS reads localStorage Main account JWT shared with user apps via URL Attacker's server receives JWT Full takeover User code on the trusted domain can steal platform credentials.

How Safebox prevents each class

Safebox's architecture addresses all five root causes at the platform layer, not in generated code. Security is a property of the infrastructure, not a feature the developer has to remember to configure.

vs. Root cause 1: Default-open data stores

Qbix Streams has access control built into the data layer. Every stream carries readLevel, writeLevel, and adminLevel that are enforced server-side on every read and write. The default is restricted, not open. Creating a stream that's world-readable requires explicitly setting readLevel to the public access level. You can't accidentally create an open data store the way you can create a Supabase table without RLS.

vs. Root cause 2: Secrets in generated code

Credentials never appear in generated code. The credential proxy resolves secrets at the infrastructure layer: user code calls a capability by name, the proxy resolves the credential from a secrets manager (AWS Secrets Manager, GCP Secret Manager, Vault), signs the outbound request, and forwards it. The generated code holds a capability reference, not a key. Bolt.new's "Stripe key in the bundle" failure is structurally impossible.

vs. Root cause 3: No sandbox isolation

Every user app runs in its own Safebox sandbox with declared capabilities. The sandbox has its own origin, its own filesystem namespace, and no access to the platform's credentials, session tokens, or other tenants' data. Base44's attack — XSS on the trusted domain reading the platform JWT — can't happen because user code never runs on the platform's domain and never sees the platform's tokens.

vs. Root cause 4: Client-side-only auth

Access control is enforced server-side in the Streams layer. The client doesn't decide what it can access. Windsurf's "API endpoints accept anything" pattern is impossible because the data layer rejects unauthorized reads and writes regardless of what the client claims.

vs. Root cause 5: No security review before deploy

Policy modules (the prompts.json judge/verify pattern) check generated code against security policies before deployment. A judge prompt examines the code for exposed credentials, missing access controls, and insecure patterns. A separate verify prompt validates the judge's findings. The two-pass check runs in its own Safebox with no ability to modify the code it's reviewing — it can only pass or fail.

vs. Root cause 6: Supply-chain and tool-trust attacks

Safebox's three-process architecture (orchestrator, privileged process, sandbox) means that even if a tool or extension is compromised, the blast radius is bounded. The orchestrator holds no credentials — those live in the privileged process, separated by a Unix socket. Tools and generated code run in the sandbox, which has its own filesystem namespace and no access to the host's SSH keys, AWS credentials, or browser storage. MCP servers run with declared capabilities only, not the developer's full permissions. The credential source abstraction means there are no flat-file secrets on the host for a supply-chain attack to exfiltrate — only Vault tokens or IAM roles that can be revoked instantly.

Architecture comparison

Typical platform User prompt → AI generates code Deploy immediately (no review) Frontend API keys in bundle Database no RLS Shared origin — user code = platform code Security = developer responsibility Safebox User prompt → AI generates code Policy modules: judge → verify Sandbox isolated origin Streams RLS by default Credential proxy — code never holds secrets Security = platform responsibility

Comparison matrix

Feature-by-feature: does the platform enforce this at the infrastructure level, or leave it to the generated code?

Security property Lovable Base44 Bolt.new Replit Cursor Windsurf Safebox
Server-side access control no no no no n/a no Streams ACL
Default-restricted data open open open open n/a open restricted
Credential isolation in code in URL in bundle in source in env partial proxy
Sandbox isolation none shared origin partial partial none none full
Pre-deploy security review none none none none none none policy modules
Secrets manager no no no .env no no AWS/GCP/Vault
Supply-chain protection none none none none compromised MCP CVEs 3-process split
Consent / provenance no no no no no no OpenClaiming

Credential architecture

The credential proxy is the mechanism that prevents secrets from appearing in generated code. User code references a capability by name. The proxy resolves the credential from a secrets manager, signs the outbound request, and forwards it. The generated code never holds, sees, or transmits the raw credential.

User code in sandbox no credentials capability Credential proxy resolves name → secret signs outbound request caches with TTL Secrets Manager / Vault signed External API Stripe, OpenAI, etc. If sandbox is compromised: attacker gets a capability reference, not a credential. Revoke the capability. The credential stays valid. No rotation needed.

What's on disk per deployment

DeploymentWhat's on diskWhat an attacker getsRevocation
Typical platform Raw API keys in source code or JS bundle The credential itself Must rotate the key at the external service
Safebox + AWS Nothing — IAM role is the identity IAM role (scoped to safebox/*) Revoke IAM role; credential stays valid
Safebox + GCP Nothing — service account is the identity Short-lived service account token Revoke SA; credential stays valid
Safebox + Vault One-time secret_id (deleted after use) Renewable, revocable Vault token vault token revoke; credential stays valid