Insights

Access rules belong in the database: what CVE-2025-48757 shows

A disputed vulnerability in an AI app builder is a useful reminder of where data protection really lives, and four questions to ask of any app.

In 2025 a security researcher scanned the public home pages of 1,645 projects built with the AI app builder Lovable and reported that 170 of them had inadequate row-level security. The record that followed is CVE-2025-48757.

The supplier disputes the issue. It says each customer is responsible for protecting their own application’s data, and the scan checked home pages only. You do not have to settle that argument to learn from the case.

The lesson that does not depend on who is right

Many AI-built apps let the browser talk straight to the database. When that is the design, there is only one thing standing between one user and another user’s records: the rules inside the database.

In PostgreSQL those rules are called row-level security. They are attached to a table and decide which rows each signed-in user may read or change. If they are missing or too loose, hiding a button on the screen protects nothing, because anyone can ask the database directly.

Where we put the rules

On our own projects the application never touches tables directly. It calls a short list of named database functions, and the database account it connects as has no direct access to the tables at all. The rule is enforced in the database, where it cannot be bypassed by a clever request, and it is written into the specification so someone can test it.

Four questions to ask of any app

  1. Who can read my data, and where is that rule enforced: on the screen, or in the database?
  2. Has anyone tried to read another user’s data on purpose?
  3. Where do the keys and passwords live, and what happens if one leaks?
  4. Is there a backup, and has someone restored it?

If nobody can answer, the app is not ready.

Sources

Worried about an app of your own? See AI-Built App Rescue & Audit.

Tell us what you need built

Describe the idea, the problem, or the app you want rescued. We reply within 2 working days.