Block Sensitive Field Mass Assignment
Allow only approved input fields when an API creates or updates a record.
A generic update handler may copy every JSON property into a database model. That makes a client-provided owner, role, price, or approval flag a security decision. The API can check access to the object and still let the caller change protected fields. OWASP API Security Top 10 covers this property-level write risk.
Define the input contract
For one create or patch endpoint, list fields the caller may set, fields the server derives, and fields that require a separate privileged action.
| Field | Source | Rule |
|---|---|---|
| Display text | Caller | Validate and allow |
| Tenant owner | Verified server context | Ignore or reject caller value |
| Role | Dedicated admin workflow | Not in general profile patch |
| Approval state | Authorized reviewer action | Never mass assign |
| Updated time | Server | Not client-controlled |
Do not rely on a hidden form field or UI restriction. Parse input against the allowlist before calling the persistence layer. Decide whether unknown fields cause a clear error or are ignored. Test that choice, because silent acceptance can hide a later regression.
Verify state, not only status
Use a synthetic record. Send an allowed change and confirm it works. Then include one protected field at a time in a controlled test. Check the stored row, audit event, queued jobs, and response. A request may return an error after a side effect has already occurred. Include create and update paths, since they often have different validators.
The OWASP ASVS provides a verification frame for input and access controls. This allowlist table is the local artifact that names the product's protected fields. Revisit it when the data model gains a new property. If a field needs a real user workflow, design that workflow with its own authorization and evidence instead of placing it in a generic update endpoint. Do not send these tests to an external API without written scope.
Find the gaps in your access controls
See how an illustrative cross-workspace finding connects evidence, impact and a fix. Discuss the tenant boundaries your team needs reviewed.