
Mass assignment happens when an API automatically copies every field in a request into an internal object. An attacker adds fields they should not control, such as "role": "admin" or "price": 0, and the API saves them.
Frameworks make it easy to bind a request body directly to a database model. If the developer does not restrict which fields may be set, any property on the model can be changed through the API, including ones that never appear in the user interface.
When an API binds every field in a request to an object, letting attackers set fields they should not control.
Allow-list accepted fields for each endpoint and use separate input models instead of binding requests to database models.
Try Vooki Pro free for 7 days
Check that your API only accepts the fields you intended. The trial unlocks every feature for 7 days, and scanning runs on your own machine.
Related: Shadow APIs and API inventory: find what you forgot · GraphQL security testing