deniz.in

Markets

Weather

Loading weather

· via dev.to (home feed)

Lovable-built apps expose personal data through missing Supabase RLS policies

Hamburg firm Crissy Field GmbH reports that many Lovable-built apps serve database records without a login; Lovable attributes the exposure to insufficient Row-Level Security, which developers can test for directly.

Lovable-built apps expose personal data through missing Supabase RLS policies

What the researchers found

A Hamburg security firm, Crissy Field GmbH, reported in November 2026 that many apps built on the AI app builder Lovable expose sensitive data without requiring a login. The German newspaper Handelsblatt covered the findings on 2 November 2026 (reporter Lina Knees), and a dev.to write-up by Devaland summarises the researchers' figures.

According to those figures, the firm identified 159,041 Lovable projects in Common Crawl data spanning December 2025 to September 2026, of which 34,545 used Supabase. On 24,664 of those sites, database records were returned as soon as a page loaded, before any sign-in. Further read-only requests showed 7,403 of them — about 30% — returning tables containing email addresses, across 10,560 tables in total.

The researchers attach heavy caveats: email addresses can be public contact details or test data, the method misses personal records without an email address, the Common Crawl sample is not representative of all Lovable apps, and serving data on page load is fine if the data is meant to be public. The 30% figure should not be read as a confirmed leak rate.

The examples are more concrete. Records the researchers say they downloaded included a German lifestyle forum exposing more than 80,000 profiles (names, email addresses, dates of birth, gender) and over 200,000 chat messages; event organisers and restaurants exposing tens of thousands of ticket and food-sales records with phone numbers, postal addresses, payment details and ticket codes; a property management company exposing AI-generated summaries of internal correspondence about tenants and business partners; and a service provider exposing over 1,000 records containing identity document details. The researchers published no access method and could not establish whether any data was misused.

Lovable points to Row-Level Security

The story drew wide attention on Hacker News on 14 November 2026. There, according to the dev.to summary, Lovable's head of security said the root cause in these apps was insufficient Row-Level Security (RLS) — the per-table rules that decide which rows a given user may read or change — that the platform's pre-publish scan is intended to catch such cases, and that a free deeper scan is available. The dev.to author could not verify the scan's details.

Why AI-generated apps get this wrong

Supabase exposes tables through an HTTP API, and the browser needs a public key — the anon key — to reach it, so that key is visible to anyone who opens the site, by design. What keeps strangers from reading everything is not the key but RLS on each table.

As the dev.to piece explains, AI-generated frontends typically fetch rows through a filter such as user_id matching the signed-in user. The other user only ever requests their own rows, so the app behaves correctly on screen — but the database was never told to refuse anything. Anyone calling the API directly, skipping the interface, can request the whole table. The failure comes down to two states: RLS switched off on a table, or RLS on with a policy broader than intended, such as one that allows any request.

How to test your app today

Using two throwaway accounts, never real customers: create data as user A, sign in as user B, and try to read, edit and delete A's data through the app. Repeat with no sign-in at all. Then test past the app: copy B's access token from browser developer tools (the local storage entry named like sb-…-auth-token) and request the full table from the REST endpoint, passing the anon key in the apikey header and B's token as the Authorization Bearer. Any row that is not B's means RLS is off or a policy is wrong. Run the request again with only the anon key to cover the unauthenticated case. Repeat for every table holding user data, and check storage buckets, since a public bucket serves files to anyone with the link.

One trap: blocked requests are often silent. With RLS on and no matching policy, a read returns an empty list and an update changes zero rows, neither raising an error; only inserts fail, with error 42501. Listing a table's policies via pg_policies in Supabase's SQL editor shows what is actually configured.

If rows come back

Enable RLS and write policies that match rows to the signed-in user, then retest, because a badly written policy can lock everyone out. Rotate exposed keys: a service_role key that reached browser code must be replaced and revoked, not merely removed, since it survives in git history. Review logs for signs of bulk reads where your plan retains them. If personal data was exposed, check your obligations — for apps with EU users, GDPR reporting to the authority often has a 72-hour deadline, and the dev.to author suggests consulting a data protection professional. Back up the database and code before changing anything.

Why it matters

The headline numbers are caveated, but the mechanism is not in dispute: all sides name database access rules, not an opaque platform flaw. That makes this a rare security story with a directly actionable core. A correct-looking AI-generated app says nothing about whether its database enforces authorization, and the test costs minutes. Any developer who has shipped a Lovable or comparable Supabase-backed app holding customer data can find out today exactly where they stand.

  • #lovable
  • #supabase
  • #row-level-security
  • #data-privacy
  • #app-security