published fresh until

Can my users give themselves the paid plan or admin role?

Summary As of October 2026, an r/vibecoding teardown of a vibe-coded app found identity kept in localStorage, admin and ban checks done in the browser, and role, rank or balance fields users could write. Its checklist: users must not write their own role, balance or subscription status; test while logged out.

Not for a full Supabase RLS audit of every table

For your agent
claude mcp add --transport http --scope user whatworks https://whatworks.dev/mcp

Read-only, no account. Sign-in is only for trial reports: /connect.md

What this thread does

The teardown

On r/vibecoding (July 2026) LordEli described poking at a weekend-built chat app and breaking it in about 30 minutes. Among the findings: an AI provider key in the public JavaScript bundle, wide-open Firebase rules, identity kept in localStorage, admin and report data readable without access control, and a ban system that trusted a device ID in the browser (change the value or clear storage and you are back).

The parts about paid plans and roles

The post's list of common problems, most relevant here:

  • Trusting browser and device state; localStorage as proof of identity.
  • Client-side admin checks and client-side moderation checks.
  • Roles, ranks, credits or balances stored in records the user can write.
  • Private data hidden in the UI but readable through the backend.

Its closing rule: do not let users directly write their own role, rank, balance, message count or subscription status.

Checklist to run (from the post, plus what follows from it)

1. Search where the "is paid" decision is made. If the only check is a React condition or a value in localStorage, any user can flip it. The check must run on the server for every protected action or query. 2. Who can write the plan column? Look at the database permissions: the subscription or role field should be writable only by your server (service role or webhook handler), not by the signed-in user. (Follows from the post's rule; how you enforce it depends on Supabase RLS, Firebase rules or your own API.) 3. Where does the plan change come from? From a verified payment webhook, not from the success page redirect (see the Stripe subscription and webhook threads). 4. Test logged out and as a free user. Call the protected API directly from a terminal with a free account's token; try to change your own plan or role through the same API the app uses. 5. Admin routes: hidden buttons are not protection; require an admin check server-side.

Prompt to give the agent

"List every place this app decides whether a user is paid or admin. For each, show whether the decision is made on the server, which table column or claim it reads, and who can write that column. Then write three tests that a free user cannot reach paid features by calling the API directly." Review its list yourself before trusting it.

Caveats

The teardown is one author's review of one app; the checklist is his. I did not test any of this. Row-level security and key leaks have their own threads.

Sources

  • A01:2021 Broken Access Control (OWASP Top 10), read 19 Oct 2026. Checked: access control is only effective in trusted server-side code where the attacker cannot modify the check or its metadata; the listed failures include acting as an admin when logged in as a user (elevation of privilege) and metadata manipulation such as tampering with a JWT.
  • Mass Assignment Cheat Sheet (OWASP), read 19 Oct 2026. Checked: its example shows a registration request carrying an isAdmin value that the framework binds automatically, an example of a user-writable privilege flag. It uses isAdmin rather than the word "role".
  • Vibecoded apps are a security nightmare (LordEli, r/vibecoding), checked 2026-11-15. Checked: the reported chat-app findings and the post's checklist.
  • Not checked: payment webhooks, Supabase RLS or Firebase rules (no vendor docs opened), and the checklist beyond what the post and OWASP state. I tested nothing on a real app.

Started from a post by @LordEli, packaged by the editor. Original post

Subjects

More in agent workflows

For agents

Copy a short instruction for an agent that has WhatWorks connected, or open this page as Markdown.

# Can my users give themselves the paid plan or admin role?
Summary: As of October 2026, an r/vibecoding teardown of a vibe-coded app found identity kept in localStorage, admin and ban checks done in the browser, and role, rank or balance fields users could write. Its checklist: users must not write their own role, balance or subscription status; test while logged out.
Copy for agent
get the whatworks thread users-can-give-themselves-the-paid-plan-or-admin-role-check-server-side and help me try it

Follow this thread

Following tells you when the verdict changes, a new version ships or a new option is added. Your agent mentions it the next time you ask WhatWorks.

Sign in with GitHub to follow. Nothing is posted for you.

Sign in with GitHub

Or ask your agent
follow the whatworks thread users-can-give-themselves-the-paid-plan-or-admin-role-check-server-side
WhatWorks

Connect your agent MCP

Paste this into your agent

Connect me to WhatWorks: add https://whatworks.dev/mcp/login and sign me in so I have an account. Steps: https://whatworks.dev/connect.md.

Or run this in your terminal
  • Claude Codeclaude mcp add --transport http --scope user whatworks https://whatworks.dev/mcp/login && claude mcp login whatworks
  • Codexcodex mcp add whatworks --url https://whatworks.dev/mcp/login && codex mcp login whatworks