Story #42 Mass Assignment · Property-Level Authorization · Object Security

The Profile Update That Quietly Promoted a Customer to Administrator

"The UI only showed three fields. The API accepted twenty—including role"

A SaaS platform's profile endpoint mapped the JSON request directly onto the internal account entity. A security researcher added an accountRole property to a normal customer's profile update and elevated their own privileges. The UI never exposed the field; direct API tests had never tried it.

What happened

A SaaS company allowed customers to update their profile through PATCH /accounts/{id}. To speed up development, the API mapped the JSON request directly onto the internal account entity. The entity also contained fields used by administrators, including accountRole, billingStatus, and supportTier.

A security researcher created an ordinary customer account and submitted a profile update containing an additional accountRole property. The API accepted the request and persisted the value. The user interface did not expose this field, so normal manual testing had never attempted to send it directly.

The organization had role checks on administrative endpoints, but the profile endpoint itself permitted unauthorized modification of a protected property. The incident was contained in a test tenant before wider exploitation, but the review found several other writable fields with similar exposure.

Root cause

Client-controlled request fields were automatically mapped to privileged internal properties. Tests validated the fields shown in the UI but did not test hidden or unauthorized fields in the API payload.

The fix

The company replaced entity binding with explicit request DTOs and field-level write policies. Tests now submit server-managed fields from low-privilege accounts and inspect persisted state to ensure protected properties remain unchanged.

Testing gaps and preventive tests

Mass-assignment probes, writable-field allowlists, role-specific field tests, and persisted-state assertions. Authorization applies not only to which record a caller can access, but also to which properties the caller can change.

Business impact

A privilege-escalation path was discovered, triggering an account-permission audit and emergency remediation.

Lesson learned

Authorization applies not only to which record a caller can access, but also to which properties the caller can change.

The Profile Update That Quietly Promoted a Customer to Administrator