A pen test reports that a web API allows mass assignment because it maps user JSON fields directly onto server-side objects. Which mitigation most directly addresses the vulnerability class?

Answer

Implement an explicit allowlist of fields that the server accepts for each operation

Explanation

Mass assignment is prevented by restricting server-side binding to an allowlisted set of fields, not by obscuring or encrypting the input.

Last reviewed: October 2026

Reviewed by FirstInTest Editorial Team

Report an error
QuestionBack to list