The Shadow Admin: How I Created Admin Accounts in Any SaaS Tenant
The user profile update endpoint bound the entire JSON request body to the database row without a whitelist, so a client could set fields such as email_verified and email to arbitrary values. The author demonstrated this on their own account, showing the server trusts a client-supplied verification flag, but did not prove account takeover.
medium.com
Published on medium.com
Mass assignment bugs get dismissed because they look cosmetic. “So what, I can set a field that isn’t in the UI.” They stop looking cosmetic once you find a field that controls a trust decision, like emailverified or role.
The full write-up lives on its author's site
It belongs to its author, so we link to it rather than copy it. The other two tabs are our own rewrites, checked against it.
Not written yet. The AI write-up for this write-up has not been written yet. The Original tab links to the source.
How it worked
Root cause
Likely the update handler passed the whole request body to the ORM's update method without a whitelist or data transfer object, making every model column writable.
Impact
A user could mark an arbitrary email address as verified without re-verification, which could lead to account takeover if a later flow treats a pre-verified email as proof of ownership, though the author did not confirm that follow-on step.
What the attacker needed
An authenticated account; access to the profile update endpoint
The fix
The endpoint should be fixed by picking only the fields a user is allowed to edit, using an explicit whitelist or DTO on every write endpoint.
How it was found
- Send an authenticated GET to a profile or settings endpoint and note fields present in the JSON but absent from the UI.
- Test write access on a harmless field such as display name and confirm it persisted with a follow-up GET.
- Send a PUT to the profile endpoint with the sensitive field set to a privileged value on your own account.
- Re-fetch the resource to confirm the privileged value was stored.
Explained by bugbounty.wiki with AI from the original and checked against quotes from it; it can still be wrong. Read the original before relying on a detail.
Not written yet. The AI write-up for this write-up has not been written yet. The Original tab links to the source.
When a website saves your profile, it should only accept the fields you are meant to edit, like your display name. Here the server accepted every field in the request, including a flag that says your email is already verified. That means a user could mark any email address as verified without going through the normal confirmation step.
What is IDOR?
One user can read or change another user's data, usually by changing an identifier the server trusts without checking who is asking. One of the most paid bug classes on web programs.