Learn how automatic parameter binding can be exploited to inject hidden properties, escalate privileges, and bypass business logic.
Object Property Assignment (also called "Mass Assignment" or "Automatic Parameter Binding") is when web frameworks automatically bind HTTP request parameters directly to object properties without validation.
Example Framework Behavior:
If the user also sends role=admin in the POST data, the framework might automatically bind it โ bypassing intended business logic.
Normal form only shows email and password fields. Attacker opens browser dev tools and adds hidden field:
When submitted, the app binds all parameters: email, password, accountType. Attacker becomes admin.
App intended to set discount=0, but attacker sends:
Framework binds discount=50. Attacker's account gets 50% off all purchases.
App has internal properties the user shouldn't control:
If the framework binds all of these, attacker gets admin powers.
Modern frameworks support nested properties via dot or bracket notation:
If deeply bound, attacker sets internal properties.
APIs auto-bind JSON properties to model objects:
Framework binds everything. Attacker gets admin role, full lab access, and API key.
GitHub (2012): Mass assignment vulnerability allowed attackers to modify repository settings (including making private repos public) by posting hidden parameters.
Stripe (API design): Deliberately avoided mass assignment by whitelisting bindable properties โ considered a best practice.
Ruby on Rails (2012): Required developers to explicitly whitelist parameters after a widely-publicized mass assignment hacks.
Easy: Inject hidden form field to escalate privilege
Medium: Bypass field whitelist by exploiting allowlist logic
Hard: Exploit nested object binding via bracket notation
API: Auto-bind JSON properties to model in REST API