Discover and exploit mass assignment vulnerabilities in REST APIs to escalate privileges, modify restricted fields, and bypass authorization controls by injecting unexpected parameters in API requests.
Discover and exploit mass assignment vulnerabilities in REST APIs to escalate privileges, modify restricted fields, and bypass authorization controls by injecting unexpected parameters in API requests.
source
mukul975/Anthropic-Cybersecurity-Skills
license
Apache-2.0
authorized_lab
true
origin_frontmatter
name: exploiting-mass-assignment-in-rest-apis | description: Discover and exploit mass assignment vulnerabilities in REST APIs to | escalate privileges, modify restricted fields, and bypass authorization controls | by injecting unexpected parameters in API requests. | domain: cybersecurity | subdomain: web-application-security | tags: | - mass-assignment | - api-security | - privilege-escalation | - rest-api | - autobinding | - parameter-injection | - owasp-api | version: '1.0' | author: mah
hide
true
AUTHORIZED-LAB ONLY. Offensive/dual-use capability. Use exclusively against systems you own or have explicit written authorization to test. This skill is gated out of the default discovery path; activation requires an explicit authorized-engagement flag.
Exploiting Mass Assignment in REST APIs
When to Use
When testing REST APIs that accept JSON input for creating or updating resources
During API security assessments of applications using ORM frameworks (Rails, Django, Laravel, Spring)
When testing user registration, profile update, or account management endpoints
During bug bounty hunting on applications with CRUD API operations
When evaluating role-based access control implementation in API-driven applications
Prerequisites
Burp Suite or Postman for API request crafting and interception
Understanding of ORM auto-binding behavior in common frameworks
API documentation or endpoint discovery through reconnaissance
Multiple user accounts with different privilege levels for testing
Knowledge of common sensitive fields (role, isAdmin, verified, balance, price)
Arjun or param-miner for hidden parameter discovery
Legal Notice: This skill is for authorized security testing and educational purposes only. Unauthorized use against systems you do not own or have written permission to test is illegal and may violate computer fraud laws.
Workflow
Step 1 — Discover API Structure and Fields
# Examine API responses to identify all object fields
curl -H "Authorization: Bearer USER_TOKEN" http://target.com/api/users/me | jq .
# Response reveals fields: id, username, email, role, isAdmin, verified, balance# Check API documentation for exposed schemas
curl http://target.com/api/docs
curl http://target.com/swagger.json
curl http://target.com/openapi.yaml
# Use Arjun for hidden parameter discovery
arjun -u http://target.com/api/users/me -m JSON -H "Authorization: Bearer USER_TOKEN"# Examine create/update request body vs response body# The response may contain more fields than the request sends# Those extra fields are mass assignment candidates
Step 2 — Test Privilege Escalation via Role Fields