cspshivam/playground
Modern Level 8 / 14 Medium
← All labs

Over-Trusting Mass Assignment

A profile form claims to edit only your name and bio, but the save endpoint trusts every field the read API over-shares. Assign yourself a role you should not have.

Account settings

Edit your display name and bio. Behind the form, the page loads and saves your whole profile as a single object through /api/profile. Ordinary users can't be admins… through the form.

Inspect what the page loads → GET /api/profile

The form submits only name and bio. Saving any other field means adding it to the POST body yourself.

GET /api/profile — the object the settings page loads to render your account

{ "name": "you", "bio": "", "role": "user", "plan": "free", "account": "acct_8842" }

The form only edits two of these fields — but the same object is what gets sent back when you save.

Current profile

name: youbio: role: userplan: free

This is an isolated, intentionally-vulnerable sandbox. Data here is fake and scoped to you. The rest of CSPSHIVAM Playground is not part of the target.