# Mass assignment of privileged fields

Client input bound to models lets callers set roles, status, approval flags, or foreign keys

_Area: Web access control and IDOR. Seen in 11 disclosed reports; 7 confirmed bounties, median $3,000, range $500-$20,000; latest 2023-07-05. Updated 2026-10-23._

## How it works
A handler binds client-supplied input directly to a model without restricting which fields may be written. The assumption that breaks is that only intended, user-editable fields arrive in the request. When the binder accepts every key, the client can also set fields the server owns: roles, approval/status flags, or foreign-key values that rebind relations to other people's records.

## Where it shows up
- Update/create handlers passing a whole request body or nested object to a model (assign_attributes, Eloquent create, serializers, GraphQL input types) [E1](https://bugbountylibrary.com/r/h1%3A743953.md)[E2](https://bugbountylibrary.com/r/blog%3Adannewitz-ninja-posts-detecting-and-exploiting-mass-assignments.md)[E4](https://bugbountylibrary.com/r/h1%3A1543159.md)[E5](https://bugbountylibrary.com/r/h1%3A42961.md)
- Fields named role, admin, is_admin, admin_approval, effective_status, status/state [E4](https://bugbountylibrary.com/r/h1%3A1543159.md)[E5](https://bugbountylibrary.com/r/h1%3A42961.md)[E6](https://bugbountylibrary.com/r/h1%3A1861487.md)
- Foreign-key arrays like issue_ids, merge_request_ids, note_ids, conversation_id, and nested `attributes` objects in import/restore manifests [E1](https://bugbountylibrary.com/r/h1%3A743953.md)[E2](https://bugbountylibrary.com/r/blog%3Adannewitz-ninja-posts-detecting-and-exploiting-mass-assignments.md)
- Structured attribute arrays where individual indices carry privileged flags (Official/Recommended) [E3](https://bugbountylibrary.com/r/h1%3A1653676.md)
- Permission arrays accepting a FULL/ALL sentinel mixed with granular tokens [E8](https://bugbountylibrary.com/r/h1%3A1088159.md)
- Shared metadata blobs returned whole and trusted on write [E7](https://bugbountylibrary.com/r/h1%3A1914115.md)

## How to review
Find every place request data reaches a model and confirm an explicit allowlist of writable fields, enforced server-side, not just in the UI. Diff serializer/strong-params allowlists against the model's columns; grep for assign_attributes/create/update called with raw params. The invariant: server-owned fields (roles, approval/status, ownership/FKs) must never be settable from client input, and authorization for the target object must be checked before any write. For importers, verify the sanitizer recurses into nested objects and rejects unknown keys rather than blacklisting known ones [E1](https://bugbountylibrary.com/r/h1%3A743953.md). For state machines, confirm the target state is derived server-side, not taken from a client variable [E6](https://bugbountylibrary.com/r/h1%3A1861487.md).

## Variants seen
- Project import manifest setting issue_ids to steal other projects' private issues [E1](https://bugbountylibrary.com/r/h1%3A743953.md)
- Signup/message forms setting arbitrary columns and conversation_id [E2](https://bugbountylibrary.com/r/blog%3Adannewitz-ninja-posts-detecting-and-exploiting-mass-assignments.md)
- Structured attribute array with client-set Official/Recommended flags [E3](https://bugbountylibrary.com/r/h1%3A1653676.md)
- PATCH setting admin_approval/effective_status to bypass review and payment [E4](https://bugbountylibrary.com/r/h1%3A1543159.md)
- PUT setting admin:true on own account for admin takeover [E5](https://bugbountylibrary.com/r/h1%3A42961.md)
- GraphQL mutation trusting client status to skip moderation [E6](https://bugbountylibrary.com/r/h1%3A1861487.md)
- Overwriting another user's metadata entry in a shared store [E7](https://bugbountylibrary.com/r/h1%3A1914115.md)
- FULL permission sentinel accepted alongside granular tokens [E8](https://bugbountylibrary.com/r/h1%3A1088159.md)

## Why fixes fail
E1 shows a blacklist of top-level *_ids keys that missed the same keys nested in `attributes`; the sanitizer did not recurse. E8 shows invalid tokens silently ignored while the FULL sentinel is accepted, leaving stale full access in place.

## Impact and severity
Cross-tenant data exposure, privilege escalation to admin, moderation/payment bypass, and availability loss where another user's encrypted upload becomes permanently undecodable [E7](https://bugbountylibrary.com/r/h1%3A1914115.md). Severity rises when the field grants role or approval state, or rebinds relations to private records.

## Evidence
- E1: https://bugbountylibrary.com/r/h1%3A743953.md
- E2: https://bugbountylibrary.com/r/blog%3Adannewitz-ninja-posts-detecting-and-exploiting-mass-assignments.md
- E3: https://bugbountylibrary.com/r/h1%3A1653676.md
- E4: https://bugbountylibrary.com/r/h1%3A1543159.md
- E5: https://bugbountylibrary.com/r/h1%3A42961.md
- E6: https://bugbountylibrary.com/r/h1%3A1861487.md
- E7: https://bugbountylibrary.com/r/h1%3A1914115.md
- E8: https://bugbountylibrary.com/r/h1%3A1088159.md
