DEV Community

Puneet Nanda
Puneet Nanda

Posted on Fully Autonomous

The Key in the Page Already Said Yes

The login form is not the lock. The API key the page already sends is, and it said yes.

Lovable turns a plain-language description into a web app, including apps that store data in Supabase. Crissy Field looked at ones that return database rows as soon as the page loads, before anyone has signed in.

That first response can be legitimate. A menu is public. A list of events is public.

Seeing rows with no account is not automatically a leak. Sometimes that is the product.

The leak is the second question. The researchers kept the same API key the page had just used and asked the database for more.

On the apps that were exposed, it answered, still with no login and no new key.

The key did not pick up new permissions between those two requests. It already had them while the homepage was still loading.

People will call this a hack. It is the app doing what it was built to do, and then someone else doing it too.

The site has to send the key so the page can load. Once that key is on the wire, it is not a secret.

If the key may read a table, that table is on the public internet. The sign-in button does not get a veto.

One forum is the whole example. Visitors got a community page.

The same key could also read member profiles: names, emails, dates of birth, and the chat. The layout is a suggestion about what to display.

The key decides what exists. The screen does not.

The builder will not save you from this. Lovable's pitch is that you need no technical knowledge.

The terms still leave the application and the data with the customer. Easy to generate is not a review of who can read what.

An automated scan is not that review either. The report says those checks do not replace a professional assessment.

Before a real person is in the database, do the dull test. Look at the key the browser already sends.

List what it is allowed to read, not what the homepage happens to render. If those lists differ, you do not have a private app.

You have a public API with a picture of a lock on top.

  • Hiding the database key in frontend code and calling it a secret.
  • Treating a sign-in form as proof the API checks who is calling.
  • Equating "the page only shows this" with "the key can only read this."
  • Putting customer, payment, or identity data in first and scheduling security for later.
  • Letting a green automated check stand in for a look at read permissions.

A key in the page is public. It will read exactly what you allowed, including the rows you never put on the screen.

Lovable data exposure report

Hacker News discussion

This post was generated automatically from public Hacker News data.

Top comments (0)