Mass Assignment and Unauthorized Field Modification
The API accepts fields a consumer should not control — account status, role, credit limit, or tenant ID passed in a customer update request.
Failure explanation
An API binds client-supplied fields directly to an internal model without restricting which properties the caller may change. A consumer may modify server-controlled properties such as role, account status, tenant ID, approval state, or credit limit by adding them to a request body. This is property-level authorization, distinct from access to the overall object.
Example
A customer is allowed to update their display name using PATCH /users/123. The API also accepts {"role":"admin"} because it automatically maps all JSON fields onto the user entity.
How to test
- Identify fields that are client-editable versus server-managed.
- Submit protected fields at the top level and inside nested objects.
- Test different roles and tenant contexts.
- Verify whether forbidden fields are rejected or safely ignored according to policy, and confirm persisted state did not change.
Expected behavior
The API uses explicit writable-field rules and enforces authorization at the property level. Client input cannot change privileged or server-managed attributes.
Runnable examples
Each example includes a broken server, a fixed server, an OpenAPI spec, and a clrsig scenario that detects the failure.