| name | hunt-mass-assignment |
| description | Hunt mass assignment via sensitive field injection and ORM framework exploitation. |
| category | redteam |
| version | 1.1.0 |
| revision_date | "2026-07-25T00:00:00.000Z" |
| license | MIT |
| platforms | ["linux"] |
| compatibility | Requires curl, python3 |
| tags | ["redteam","mass-assignment","API","ORM","authorization","field-injection"] |
| related_skills | ["hunt-api-misconfig","hunt-idor","hunt-write-gap"] |
Mass Assignment Hunting
Hunt for mass assignment vulnerabilities where API endpoints blindly bind user-supplied fields to internal objects without allowlisting. Sensitive fields like isAdmin, role, ownerId, plan, tier, balance, and verified can be injected to escalate privileges, bypass payments, or assume ownership of resources.
When to Use
- API accepts JSON/XML/form body with fields beyond what the UI exposes.
- User profile updates, registration, checkout, or resource creation endpoints.
- Framework ORMs (Rails ActiveRecord, Laravel Eloquent, Django ORM, Mongoose, Prisma) where bulk assignment is the default.
- PATCH endpoints that accept sparse updates — may skip per-field authorization.
Quick Detection
curl --max-time 30 --connect-timeout 10 -sk -X PATCH "https://target.com/api/user/profile" \
-H "Content-Type: application/json" \
-d '{"name":"test","isAdmin":true,"role":"admin"}'
Key Sensitive Field Dictionary
| Field | Impact |
|---|
isAdmin, is_admin, admin | Admin escalation |
role, roles, user_role | Role escalation |
ownerId, user_id, authorId | Resource takeover |
plan, tier, subscription_type | Payment bypass |
balance, credits, wallet | Financial manipulation |
verified, is_verified, email_verified | Verification bypass |
discount, coupon_applied, promo |