Skip to content

Blog · November 21, 2026

Can a user make themselves an admin?

Many apps save a profile by writing whatever the browser sends straight to the database.

Many apps save a profile by writing whatever the browser sends straight to the database. AI tools often build it this way.

The risk: if your users table has fields like "role" or "plan", someone can add "role": "admin" to the request and give themselves full access, or a paid plan for free.

How to check:

  1. Open dev tools and watch the request when you save your profile.
  2. Send it again with an extra field, like "role": "admin".
  3. See if the change sticks.

To fix it, ask your AI tool: "On the server, only let users update safe fields like name and avatar. Never let them change role, plan, or user ID. In Supabase, block these changes with RLS or a trigger."

VibeVigil scans your live app for common security gaps. Try it free: https://vibevigil.com

A short note. Not a promise.

If you want to know about your own site, run the free scan.

Scan a site you own. It is free. No account.

You see the report first. Saving the site is optional.

No account. The report is the next page.

Free, no account. We fetch the public page, its scripts, and a few well-known paths.

Can a user make themselves an admin? · VibeVigil