What went wrong in the Lovable, Tea, and EnrichLead incidents
A technical breakdown of real-world AI-built and rushed web app breaches—missing Supabase Row Level Security (CVE-2025-48757), open Firebase buckets, and unthrottled client APIs.
Prompting an AI coding assistant to ship a full-stack web application in an afternoon feels effortless until the app meets public internet traffic. Because generative tools optimize for code that compiles and looks convincing in a demo preview, security controls that do not visibly break the happy path are routinely skipped or configured backward.
Over 2025 and 2026, three high-profile incidents showed exactly what breaks when AI-generated or rushed MVPs reach production without a security review.
1. Lovable & Supabase Row Level Security (CVE-2025-48757)
Most apps scaffolded by browser-based AI builders connect directly from client-side React code to a Supabase Postgres backend using a public anon key. That key is designed to be public in the browser—meaning Postgres Row Level Security (RLS) is the sole boundary protecting every table.
In March–May 2025, security researcher Matt Palmer and collaborators scanned 1,645 Lovable-built web applications and found 170 apps (~10.3%) containing 303 vulnerable endpoints exposing underlying tables directly to unauthenticated REST queries (CVE-2025-48757). Exposed records included user emails, personal data, subscription rows, and third-party API keys.
By November 2026, a broader scan reported by Handelsblatt and Crissy Field researchers inspected more than 159,000 deployed Lovable projects and found over 24,000 apps still leaking database contents to unauthenticated visitors, including private messages and uploaded identity documents.
The underlying flaw is almost always one of two patterns: RLS left disabled on a newly generated table, or a placeholder policy left open so the demo works quickly:
-- Vulnerable pattern generated during prototyping:
ALTER TABLE public.customer_invoices ENABLE ROW LEVEL SECURITY;
CREATE POLICY "allow_all_read"
ON public.customer_invoices
FOR SELECT
USING (true);
Even when an automated platform check displays a green indicator because RLS is toggled on, USING (true) still lets any anonymous visitor dump the entire table with one curl request against the REST API. Hardened policies must bind reads and writes strictly to an authenticated tenant or user claim:
-- Production-safe tenant ownership check:
CREATE POLICY "read_own_invoices"
ON public.customer_invoices
FOR SELECT
TO authenticated
USING (account_id = (auth.jwt() ->> 'account_id')::uuid);
2. The Tea App Firebase Storage & Message Exposure (July 2025)
In July 2025, the dating-safety app Tea surged in downloads before a legacy Google Firebase Storage bucket was discovered wide open on the public internet without access rules. Anyone holding the bucket URL could list directories and download files directly.
The exposure leaked roughly 72,000 user images—including around 13,000 verification selfies paired with driver’s licenses and passport photos alongside 59,000 additional media files. Subsequent inspection by independent security researchers revealed a separate missing access control that exposed over 1.1 million private direct messages containing phone numbers and locations.
Storage rules suffer from the exact same failure mode as database RLS: default bucket permissions left open for fast prototyping rarely get locked down before viral traffic hits.
3. EnrichLead and “Zero Hand-Written Code” Collapse
EnrichLead gained attention in 2025 when its founder launched publicly claiming 100% of the application was generated with Cursor AI and zero hand-written code. Within days of launch, attackers found trivial ways to bypass client-side paywall gates, flooded unthrottled backend routes with automated requests lacking rate limits or schema validation, and burned through linked API usage and billing limits.
When the founder tried prompting the editor to patch the holes, edits broke adjacent modules faster than they resolved the exposure, forcing a permanent shutdown.
Why AI agents miss these flaws when auditing themselves
Asking the same coding agent “is my app secure?” often produces false confidence:
- Agents inspect components locally, missing cross-layer trust boundaries between client env vars (
VITE_*,NEXT_PUBLIC_*), database policies, and storage rules. - Client-side guards look like authorization in code snippets even though attackers call APIs directly outside the browser.
- Rate limits, SSRF filters, and strict CSP headers rarely break local tests when omitted, so generative tools skip them unless explicitly engineered.
Six checks before launching any AI-assisted web app
- Audit every database table and storage bucket for disabled RLS or open
USING (true)policies before adding real user data. - Search client build outputs to confirm zero
service_role, Stripe secret, or webhook signing keys appear in browser bundles. - Validate all inputs server-side with explicit schemas (such as Zod) and block private/loopback hostnames on any URL-fetching endpoint.
- Enforce per-IP rate limits on signup, contact, webhook, and compute-heavy HTTP endpoints.
- Enforce strict browser security headers (
Content-Security-Policy,HSTS,X-Frame-Options,X-Content-Type-Options). - Keep human ownership of architecture boundaries—see how we locked down six exposed tables ahead of clinic approval in our Clearwater Bio case study.