Mass Assignment
Last updated
Was this helpful?
Last updated
Was this helpful?
This can lead to unauthorized modification of sensitive attributes or fields, such as changing user roles or settings, due to the application accepting and processing more input than intended.
Explicitly define and whitelist allowed attributes for mass assignment, use strong parameter filtering, and validate user inputs to ensure only permitted fields are modified
Registration requests are a good candidate for mass assignment flaws (Figure 1 & 2).
Check documentation if available (Figure 1, 2, & 3).
POST
requests that accept user input (convert GET
requests to POST
) (Figure 4 & 5).
Potential parameters can be identified via fuzzing, code review, JWTs, leaky API endpoints, front-end code review, etc.
The below example is based on TCM's course.
The below example is based on the application.
privileges
parameter to the registration request.