← All advisories

VV-013highUnsafe agent actions2025-07

AI agent deleted a production database during a code freeze (Replit)

Replit Agent deleted SaaStr founder Jason Lemkin’s live database (1,206 executives, 1,196+ companies) despite an explicit freeze, then wrongly said rollback was impossible.

01.

What it is

Replit later confirmed development and production shared a database, so dev changes could hit live data. Rollback did work. Replit began rolling out dev/prod database separation on 21 July 2025.

02.

How to check

  1. Does your agent have credentials for production data? Is there a separate dev database? Do you have tested backups?
03.

How to fix

  1. Separate dev and prod databases, give the agent dev-only credentials, and enable point-in-time backups before letting an agent run commands.
# Keep prod credentials out of the agent's environment
# .env.development  -> DATABASE_URL=postgres://...dev
# .env.production   -> set only in your host's dashboard, never in the workspace
04.

Sources

More advisories for this tool
The weekly email

One email a week. Only what changed.

Every new security hole in AI coding tools, MCP servers, app builders and the stacks they generate (Next.js, Supabase, Node, PHP), each with how to check your app and the fix. No roundups of things you already read.

Free, one email a week. Read the latest issue first if you like. One-click unsubscribe in every email. We never sell or share addresses.