From “Just a User” to Admin: Exploiting a Mass Assignment Flaw to Take Over a Production AI Platform
A profile-update endpoint bound the whole request body to the user model, so any registered user could add a role field and become an administrator. The attacker could then log into the admin console, read private chat logs and publish content to the public homepage.
Cybersecurity
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.
Context
The target was an AI-powered platform, referred to in the write-up as redacted.com to protect the client's confidentiality. The engagement was an authorised penetration test. The platform exposed three surfaces:
https://redacted.com, public web apphttps://api.redacted.com, REST API backendhttps://admin.redacted.com, internal admin console
Like most modern applications, the platform let logged-in users update their own profile (name, email and similar fields) through a self-service endpoint:
PUT /users/{id}
The intended workflow was simple: register, receive the default "role": "user", and stop there. Role changes were supposed to be an administrative action, gated behind a separate approval process.
Setup
The precondition was minimal: a single ordinary registered account on the public web app. No special tooling, no elevated privileges and no user interaction were needed. The researcher's own account carried the default "role": "user" and was used throughout.
Finding it
The backend was not enforcing the separation between self-service profile edits and administrative role changes. The endpoint accepted any field in the JSON body and wrote it to the database, including a field that was never meant to be client-controllable: role.
This is mass assignment: instead of whitelisting exactly which fields a client is allowed to set, the server binds the whole request body to the internal model. When one of those fields is a privilege-bearing attribute, anyone who notices can set it.
Exploitation
Step 1: Confirm the normal profile update
A completely ordinary profile update looked like this:
PUT /users/me/update-profile{ "name": "AdminTest"}
The response was 200 OK and the profile was updated. Nothing anomalous at this stage.
Step 2: Add the undocumented parameter
The researcher then added one undocumented parameter to the same request:
PUT /users/me/update-profile{ "name": "AdminTest", "role": "admin"}
The response was still 200 OK, with "message": "User Updated Successfully". Checking the returned object confirmed the change: "role": "admin".
One extra key-value pair was enough to turn a standard user account into an administrator.
Step 3: Use the role against the admin console
A role flag by itself is just data; the real question is whether anything downstream trusts it. Here it did. Logging into admin.redacted.com with the same session worked immediately, giving access to the following:
- Dashboard, aggregate stats (115 users, 4,824 chats, 7,501 search queries)
- User List, every registered user, paginated
- Chats, full conversation logs, including search queries tied to specific users and their location (city, region, country)
- Trending Questions, an editable module that feeds directly into the public homepage
Step 4: Demonstrate write access
To show the impact was not limited to viewing an admin panel, the researcher demonstrated write-level access: a new Trending Question entry was created through the admin interface. It appeared live on the public homepage within moments. An attacker with this bug could therefore deface or inject arbitrary content into a production AI product with no further exploitation needed.
Root cause
Three issues compounded:
- No server-side allow-list, the update endpoint should only ever accept fields such as
nameandemail. Anything else should be silently dropped or rejected. - Authorization decisions trusted client-supplied data, the application treated the
rolefield in the database as authoritative, rather than re-verifying permissions from a trusted source before every privileged action. - No separation of concerns, role changes should never live on the same endpoint as a user's own self-service profile edits. They need their own route, with independent admin sign-off.
The server bound the raw body to the model regardless, so that assumption did not hold.
Impact
Any ordinary registered user could promote themselves to full administrator with no approval and no second factor. From there the researcher could log into the admin panel, view private chat logs of thousands of users, and push content live to the public homepage.
The researcher scored this 9.9 (Critical) with the vector CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:C/C:H/I:H/A:H: low attack complexity, low privilege required (any registered user), no user interaction, and a scope change, since compromising one account grants control over a completely separate security boundary (the admin console).
The bug has since been patched by the client.
Fix
The client's remediation, which the researcher re-verified before writing up, is now live:
- An explicit allow-list on every profile-update request;
roleand other privilege fields are now rejected outright on self-service endpoints. - Role changes moved to a dedicated, admin-only endpoint.
- The backend now re-checks permissions from a trusted server-side source before any privileged action, instead of trusting the stored flag blindly.
- Existing accounts were audited and any unauthorised role changes reverted.
Variants to test
- Smuggle privilege fields into every self-service update route. Send
role,is_admin,permissionsand similar keys alongside legitimate fields on profile, settings and account endpoints. - Try nested and alternate representations. A positive result is the stored value changing without an explicit allow-list entry for it.
- Check whether the role flag is trusted downstream. A positive result is access to admin-only functionality without a separate authorisation check.
- Test write paths beyond the profile.
- Add a regression test that specifically tries to smuggle a privilege field into every "update my own stuff" endpoint you ship.
This class of bug is CWE-915 and OWASP API3:2023 (Broken Object Property Level Authorization). Both are well documented, and both still show up in production in 2026.

What happened, in plain words
A security researcher was hired to test an AI-powered website, with the client's permission. This kind of authorised test is called a penetration test: you are given a target and asked to break in, so the owner can fix the problems before a real attacker finds them. The site is called redacted.com in the write-up so the client's identity stays private.
The platform had three parts:
https://redacted.com, the public web app, the site ordinary visitors and members use in a browser.https://api.redacted.com, the REST API backend. An API is the part of a website that the browser talks to behind the scenes: the page you see asks the API for data, and the API answers with data. Think of a restaurant: the menu and the waiter are the web app, the kitchen is the API. You never walk into the kitchen yourself, but your order goes there.https://admin.redacted.com, the internal admin console, a separate site used by staff to manage the platform.
Like most modern sites, the platform let a logged-in member edit their own profile: name, email and similar details. The request used for that was:
PUT /users/{id}
In plain words: PUT is the HTTP method used when you want to replace or update something on the server. /users/{id} is the address of one user's record, where {id} stands for that user's number. So the line says "update the user with this id".
The intended behaviour was simple. You register, you get the default role "user", and that is where it stops. A role is a label stored with your account that says what you are allowed to do. Changing a role was meant to be an administrative action, handled through a separate approval process.
It was not. The server accepted any field in the request body and saved it to the database, including a field called role that was never meant to be set by the person using the site. A field here is one named piece of data in a request, like name or email. The request body is the package of data the browser sends along with the request. The database is where the site keeps its records permanently.
This class of bug is called mass assignment. The name describes what goes wrong: the server takes the whole bundle of fields the client sent and assigns all of them to its internal record, instead of checking each one against a list of fields the client is allowed to set. That list is called an allow-list (or whitelist). Without one, if any of the accepted fields controls a privilege, anyone who notices can set it.
The target
The three surfaces were:
https://redacted.com, public web apphttps://api.redacted.com, REST API backendhttps://admin.redacted.com, internal admin console
Setup
The starting point was minimal: one ordinary registered account on the public web app. No special tools, no elevated permissions and no action by another person were needed. The researcher's own account had the default "role": "user" and was used for everything that follows.
Why start there? Because the most serious bugs are the ones an ordinary member can reach. If you need special access to exploit something, fewer people can do it. If any registered user can do it, the problem is much bigger.
Finding it
The backend was not keeping self-service profile edits separate from administrative role changes. The endpoint accepted any field in the JSON body and wrote it to the database, including role.
JSON is a common text format for sending structured data between a browser and a server. It looks like a list of labels and values inside curly brackets, for example {"name": "AdminTest"}. An endpoint is one specific address on a server that does one specific job, like a single counter in a large office: you go to that counter for that service.
So the server was doing the equivalent of a hotel receptionist who accepts any note you hand over, including one that says "give this guest a master key", and acts on it without checking who wrote it.
Exploitation
Step 1: Confirm the normal profile update
First, a completely ordinary profile update:
PUT /users/me/update-profile{ "name": "AdminTest"}
Line by line:
PUT /users/me/update-profile, send an update request to the address that handles profile changes.memeans "my own account", so the server knows whose profile to change from the session.{ "name": "AdminTest" }, the body: one field,name, set to the valueAdminTest.
The response was 200 OK and the profile was updated. A status code is a three-digit number the server sends back to say how the request went; 200 means success. Nothing unusual at this stage. This step matters because you need to know what normal looks like before you can spot what is not normal.
Step 2: Add the undocumented parameter
Then the researcher added one parameter that was not documented anywhere:
PUT /users/me/update-profile{ "name": "AdminTest", "role": "admin"}
Line by line:
PUT /users/me/update-profile, the same request as before, to the same address.{ "name": "AdminTest", "role": "admin" }, the same body, plus one extra pair: the fieldroleset to the valueadmin.
A parameter is just a named value sent with a request. "Undocumented" means the site's own interface never offered it and the documentation never mentioned it, but the server still understood it.
The response was still 200 OK, with "message": "User Updated Successfully". Checking the returned object confirmed the change: "role": "admin". The returned object is the data the server sends back describing the record after the change, so it is the server's own confirmation of what it saved.
One extra key-value pair was enough to turn a standard user account into an administrator. A key-value pair is one label and its value, like "role": "admin".
Step 3: Use the role against the admin console
A role flag by itself is only data. The real question is whether anything else on the platform trusts it. Here it did. Logging into admin.redacted.com with the same session worked immediately.
A session is how a website remembers that you are logged in. After you sign in, the server gives your browser a small piece of data, often stored in a cookie (a small file the browser keeps for a site) or sent as a token (a string your browser presents with each request, like a wristband at an event). Every later request carries it, and the server uses it to recognise you without asking for your password again. Because the admin console trusted the same session and read the role from the database, the newly promoted account walked straight in.
The admin console gave access to:
- Dashboard, aggregate stats (115 users, 4,824 chats, 7,501 search queries). Aggregate means totals rather than individual records.
- User List, every registered user, paginated. Paginated means shown in pages rather than all at once.
- Chats, full conversation logs, including search queries tied to specific users and their location (city, region, country).
- Trending Questions, an editable module that feeds directly into the public homepage. A module is one self-contained feature area of a site.
Step 4: Demonstrate write access
To show the impact was not limited to viewing an admin panel, the researcher demonstrated write-level access: a new Trending Question entry was created through the admin interface, and it appeared live on the public homepage within moments.
Read access means seeing data. Write access means changing it. The distinction matters because reading private logs is serious, but changing what the public sees is a different kind of damage. An attacker with this bug could deface or inject arbitrary content into a production AI product with no further exploitation needed. Production means the real, live system that actual users are using, not a test copy.
Root cause
Three issues combined:
- No server-side allow-list, the update endpoint should only ever accept fields such as
nameandemail. Anything else should be silently dropped or rejected. "Server-side" means the check happens on the server, where the user cannot bypass it, rather than in the browser, where anything can be changed. - Authorisation decisions trusted client-supplied data, the application treated the
rolefield in the database as authoritative, rather than re-checking permissions from a trusted source before every privileged action. Authorisation is the decision about what a logged-in user is allowed to do. Client-supplied means it came from the browser, which the user controls. - No separation of concerns, role changes should never live on the same endpoint as a user's own self-service profile edits. They need their own route, with independent admin sign-off.
The server bound the raw body to the model regardless, so that assumption did not hold. In everyday terms: the form on the website had no box for "role", so the developers assumed nobody could send one. But a form is only a convenience; the request can be built by hand, and the server accepted whatever arrived.
Impact
Any ordinary registered user could promote themselves to full administrator, with no approval and no second factor. A second factor is an extra proof of identity beyond a password, such as a code from a phone.
From there the researcher could log into the admin panel, view private chat logs of thousands of users, and push content live to the public homepage.
The researcher scored this 9.9 (Critical) with the vector CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:C/C:H/I:H/A:H. CVSS is a standard scoring system for the severity of a security flaw. The vector is the string that records how the score was reached:
AV:N, attack vector: network, meaning it can be done remotely over the internet.AC:L, attack complexity: low, meaning no special conditions are needed.PR:L, privileges required: low, meaning any registered user is enough.UI:N, user interaction: none, meaning no victim has to click anything.S:C, scope: changed, because compromising one account grants control over a separate security boundary, the admin console.C:H/I:H/A:H, confidentiality, integrity and availability: high impact on all three. In plain words: data can be read, data can be changed, and the service can be affected.
The bug has since been patched by the client. A patch is a fix applied to the live system.
Fix
The client's remediation, which the researcher re-checked before writing up, is now live:
- An explicit allow-list on every profile-update request;
roleand other privilege fields are now rejected outright on self-service endpoints. - Role changes moved to a dedicated, admin-only endpoint.
- The backend now re-checks permissions from a trusted server-side source before any privileged action, instead of trusting the stored flag blindly.
- Existing accounts were audited and any unauthorised role changes reverted. An audit here means reviewing the records to find anything that should not be there.
Variants to test
If you test or build sites, these are the follow-up checks worth doing:
- Smuggle privilege fields into every self-service update route. Send
role,is_admin,permissionsand similar keys alongside legitimate fields on profile, settings and account endpoints. - Try nested and alternate representations. A positive result is the stored value changing without an explicit allow-list entry for it. Nested means one object placed inside another, and differently cased means the same word written with different capital letters.
- Check whether the role flag is trusted downstream. A positive result is access to admin-only functionality without a separate authorisation check.
- Test write paths beyond the profile.
- Add a regression test that specifically tries to smuggle a privilege field into every "update my own stuff" endpoint you ship. A regression test is an automated check that runs again and again to make sure a fixed bug does not come back.
This class of bug is CWE-915 and OWASP API3:2023 (Broken Object Property Level Authorization). CWE is a catalogue of weakness types, and OWASP is a community project that publishes guidance on common application security problems. Both are well documented, and both still show up in production in 2026.

Glossary
- API: the part of a website that the browser talks to behind the scenes, sending and receiving data.
- Allow-list: a list of things that are explicitly permitted; anything not on the list is refused.
- Audit: a review of records to find anything that should not be there.
- Authorisation: the decision about what a logged-in user is allowed to do.
- Client-supplied: data that came from the browser, which the user controls.
- Cookie: a small file a website stores in your browser so it can recognise you later.
- CVSS: a standard scoring system for the severity of a security flaw.
- CWE: a catalogue of weakness types used to classify security bugs.
- Database: where a site keeps its records permanently.
- Endpoint: one specific address on a server that performs one specific job.
- Field: one named piece of data in a request or record, such as
name. - JSON: a common text format for sending structured data between a browser and a server.
- Key-value pair: one label and its value, such as
"role": "admin". - Mass assignment: a bug where the server saves every field the client sent to its internal record instead of checking each against an allow-list.
- Module: one self-contained feature area of a site.
- Nested: one object placed inside another.
- OWASP: a community project that publishes guidance on common application security problems.
- Paginated: shown in pages rather than all at once.
- Parameter: a named value sent with a request.
- Patch: a fix applied to a live system.
- Penetration test: an authorised, paid attempt to break into a system so the owner can fix the problems.
- Production: the real, live system that actual users are using.
- Read access: permission to see data.
- Regression test: an automated check that runs repeatedly to make sure a fixed bug does not return.
- Request body: the package of data sent along with a request.
- Returned object: the data the server sends back describing a record after a change.
- Role: a label stored with an account that says what it is allowed to do.
- Second factor: an extra proof of identity beyond a password, such as a code from a phone.
- Server-side: a check that happens on the server, where the user cannot bypass it.
- Session: how a website remembers that you are logged in, usually via a cookie or token.
- Status code: a three-digit number the server sends back to say how a request went;
200means success. - Token: a string your browser presents with each request to prove who you are.
- Write access: permission to change data.