Skip to content

Replit

What breaks in Replit apps in production?

Last updated 18 September 2026 · verified against each platform’s own documentation

It’s well known at this point that in July 2025, Replit deleted one of their customers’ production databases; it’s one of the most-cited incidents of vibe code platforms screwing up. However, Replit addressed the underlying problem immediately, shipping separate development and production environments as default across all users within a few weeks. What they didn’t fix is architectural: Replit apps come with an Express server by default, which holds a single database connection shared across all visitors. What that means is that every request must be individually verified to ensure that it protects what’s behind it; every access rule lives in application code. The only way to know that every rule does what it should is to read through them, one at a time. That’s what a Replit audit is: $499, one week, all findings prioritized in order of importance.

Did Replit fix the database deletion? Yes, but here’s what it didn’t fix

In July 2025, Replit’s agent deleted production data during an explicit code freeze. The incident caught a fair bit of attention thanks to some quick social media work by the affected user, SaaStr founder Jason Lemkin, and Replit CEO Amjad Masad immediately promised a fix. That fix was a new development database alongside the production database in all Replit projects. That hard separation prevents further incidents of this kind, and is now standard across all Replit Apps. All of which is to say, the underlying cause of the most famous vibe coding catastrophe has been pretty well sewn up. Which lets us focus on the other risks hiding in Replit’s Apps.

What Replit secures, and what remains your problem

As Replit’s user base builds more and more complex apps, and runs into more and more problems with security and privacy, the Replit team continues to build out a pretty robust suite of security tools and attestations. They have built SOC 2 Type 2 compliance for their own platform, which is a strong indication that you, as their user, can trust their handling of your data. And they provide agentic scans of your source code, as well as agent-driven penetration testing of your app. These are pretty robust tools already at your disposal, and if you haven’t familiarized yourself with them yet, you should do so. But according to their own security checklist:

While Replit provides many security features out of the box, it’s important to understand and implement more security measures for your specific application needs.

And while they point out the importance of such things as authorization checks to verify user permissions before allowing certain actions, preventing sensitive data from reaching the browser, and input sanitization, they leave the details of implementation to you and your interactions with the agent.

Why a Replit app fails differently from a Lovable app

Though their end products and user experiences are roughly similar (tell the chat what you want, an app comes out the other end), the major vibe code platforms all build the underlying architecture in distinct ways.

Supabase-backed request path — row-level security firesTop to bottom, one request. The browser sends a JWT for this user to PostgREST. PostgREST authenticates but does not authorize. It then issues SET LOCAL ROLE authenticated plus this user’s claims to Postgres, so row-level security fires: the database knows who is asking.Supabase-backed (Lovable, Bolt.new)PostgREST in front of PostgresBrowserJWT for this userPostgRESTauthenticates.does not authorize.SET LOCAL ROLE authenticated+ this user’s claimsPostgresRLS ► FIRESknows who’s askingExpress-backed request path — row-level security never firesTop to bottom, one request. The browser sends a session cookie to your Express server, which decides access route by route. Of its four routes, GET /api/orders, GET /api/orders/:id and POST /api/team check ownership; GET /api/export has no ownership check. Every request then reaches Postgres over one connection, for every visitor — so row-level security never fires: the database is never told who is asking.Express-backed (Replit)an application server in front of PostgresBrowsersession cookieYour Express serverGET/api/ordersGET/api/orders/:idGET/api/exportno ownership checkPOST/api/teamONE connection, every visitorPostgresRLS ► NEVER FIRESnever told who’s asking

Same database engine. Same feature available on both sides. Only one of them is ever told who is asking.

Both databases can enforce row-level security. Only one of them is ever told who is asking. Read each column top to bottom as a single request. On the left, PostgREST authenticates and stops — authorization is the database’s job, and the connection carries this user’s identity, so row-level security has something to act on. On the right, Express decides access route by route and reaches Postgres over one shared connection, so the same row-level security feature has nothing to act on. The difference is the arrow above the database, not the database.

In both Lovable and Bolt, the browser (Chrome, Firefox, Safari, Edge if you hate yourself), communicates almost directly to the Postgres database, with only a thin PostgREST API in between. That PostgREST API is responsible for authentication - confirming that the user is who they say they are. All authorization, which is the series of rules dictating what data can be seen by which user, is determined by a list of rules held by the database itself, called Row Level Security (RLS). RLS is what it says: security rules dictating what can happen to data on a row-by-row basis.

Replit Apps rely on a fundamentally different architecture, one in which all requests pass through a larger, Express.js application server on their way to the Neon database via Drizzle Object Relational Mapping. That is the fundamental difference between Replit and its competitors, and it leads to distinct failure modes between the different platforms. With RLS, you can be sure that every request to the database is going through some sort of authorization check, but the many different rules you have to maintain can lead to complexity and fragility. With a central application server, you have the ability to define more robust authorization schemes, but to apply the proper scheme you have to ensure that all routes through the application are hooked in correctly. It also means that both frontend and backend code live on the same server, which can cause things to bleed from the the place they’re supposed to be to the place they aren’t.

Five things that break in a Replit app in production

With their React + Express + Drizzle + Postgres stack, there are a number of failure modes to look out for:

  1. Every route is its own security decision

    Even with a very thoughtful, robust, well implemented authorization scheme, you need to ensure that it’s hooked up to every point of entry. Even if you know that admins should only be able to see users belonging to their organization, if you build a new “get all users” endpoint and neglect to hook it to your well-built authorization logic, you’ve exposed a new attack surface. Being thorough with this basic housekeeping step is essential, and when you’re building fast it’s an easy thing to overlook.

  2. Secrets that reach the browser

    Because Replit relies on one Express server for both backend logic and serving the user code for their browser, there’s a possibility of code leaking from one surface to another. Replit compiles your production frontend code ahead of time to increase delivery speed. If your backend code needs, say, a secret api key for a third-party integration, and if you mislabel it in the build pipeline, it could end up being sent to every user’s browser. Bad actors could then grab the secret right out of the browser and impersonate you.

  3. One process serving the frontend and the API

    The single application server architecture can have additional limitations at scale. As an application’s user base grows, there will naturally be pieces that are more and less resource intensive. That difference could be down to usage (one feature is much more popular than another), or type (a big report generation workflow requires more compute than a simple record lookup). In this architecture, because there is one process responsible for every part of your app, you have to scale every piece together. You could argue this is a good problem to have; you have so many people using your report generation product that you need to grow it. But it means that your costs will be difficult to manage, and there’s no way out of the problem without a fundamental shift in architecture that Replit can’t provide.

  4. Your customers need a Replit account to log in

    By default, all users signing in to your application, in any environment, must use Replit’s own authentication. The first problem with that isn’t strictly security-related, it’s simply that your users will be interacting with an app and branding outside of your own organization. It works, but it isn’t the best user experience. The second problem IS technical: you’re trusting some of the most sensitive and important data your app deals with to a third party, in a way that makes it very difficult to migrate away once your application outgrows the feature set that Replit auth provides. There is a solution to this, which is to build a Clerk Auth integration to your app. Once you’ve done so, you’ll have full control of the data, allowing you to migrate off the Replit platform without losing user accounts.

  5. Metered endpoints with no rate limit

    Replit’s Autoscale Deployments offer a cost-efficient way to host your app: when no one’s using it, it doesn’t cost you anything. When people are using it, you only pay for the resources you use. That’s great, as long as you’re careful about building limits into your application. If you don’t, there’s nothing to prevent a user inadvertently (or purposefully) performing the same action over and over, racking up huge bills. A recent analysis by a cybersecurity firm found that the most common flaw in AI-generated code was a lack of rate-limit controls. And it wouldn’t take a hack to expose this and cost you money; if your agent builds retry logic without a proper termination condition, normal user flows could cause endlessly repeated calls to your backend, costing you big bucks without any bad intention from anyone.

What a Replit audit covers

Replit’s own Agent security scans are an excellent, free resource that will catch many major vulnerabilities in your application. If you haven’t run one lately, do that now. But they can’t catch what they don’t look for, and where many of the limitations of your app are inherent to Replit’s architecture, you can’t expect the agent to flag issues. Nor can you expect them to ask questions specific to your business - they can tell you that an auth check is broken, but not that it may not be the most appropriate auth scheme for your use case. With an audit from Aspen Automation, you see:

  1. Routes: Every route, line by line, for a real server-side ownership check
  2. Secrets: The built client bundle, inspected for anything that shouldn't be included
  3. Scale Analysis: An architecture digest, laying out the limits of the Replit architecture as it applies to your specific business and product
  4. Replit Auth: Authorization scheme reviewed, and a priced out migration guide for the move to Clerk Auth
  5. Rate Limits: Vulnerability analysis of anything that costs money to serve, so you know if you're exposed to a shock bill

We’ll also ask the questions you won’t hear from Replit themselves: is this architecture working for you? Will it work for you as your user base grows? What about when you finally get around to that new feature that requires a new technology?

After talking with you personally to understand your business, your app, and your vision for the product, we’ll work through the code, the application, and any critical integrations to build you an in-depth report. That report covers the shape of your app, severity-ordered findings, and a roadmap for remediation and new features, all written so that you can understand your app better than ever and immediately deliver any findings to your Replit agent for a fix. And the investigation happens while you continue work; there’s no need to pause development.

What it costs

$499, 1 week.

That price is regardless of the size of your app, the complexity of your business, or the state of your product. Our mission is to take even the stickiest problems and organize them in a way that you can understand the key pieces of your software in as simple a manner as possible.

When you don’t need us

Four hundred and ninety nine US dollars is a lot of money right now, especially given the quality of Replit’s own tools. They’ll more than meet your needs if your app is:

  • A prototype, built just to get a sense of how an app could work
  • An internal tool, limited to only a few trusted users in your own organization
  • Not dealing with any sensitive data, such as financial or personal health information

But if you’re processing sensitive data, especially that beholden to a compliance regime like HIPAA or FERPA; if you’re looking to scale to a large number of users, or users across organizations; or if you just want to ensure you aren’t at risk of a huge surprise bill, consider working with us. You’ll love us; we’re great listeners, and oh so handsome.

Common questions

Did Replit fix the problem that deleted a production database?
Yes. Within a few weeks they locked down all apps so that their build agent is completely firewalled out of the production database.
Does my Replit app need row-level security like a Lovable app?
RLS is one form of authorization, and Replit's tech-stack does support it. But no, it isn't generally necessary. A robust authorization scheme managed in the Express application server, well-managed and connected to all the proper routes, is a wonderful security protocol.
Do my customers need a Replit account to log into my app?
Yes, if you have the default Replit Auth setting. That will include Replit-branded login pages, and make it impossible to migrate user accounts out of the platform. If you implement the Clerk Auth integration, you have full control over user data and login experience.
How much does a Replit app audit cost?
$499, fixed price, one week
What if the audit finds nothing?
You get a report saying so, as well as detailing your application, its fit to your business case, and a roadmap of how best to build that next feature you're excited about.

Find out before your customers do

One week, $499, a severity-ordered report you can hand straight to your Replit agent. Delivered personally by one of our founders, the same week you sign up.