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.
Instalar com Codex ou Claude Copie este prompt, cole no Codex, Claude ou outro assistente e deixe que ele revise a página da skill e instale para você.
Um comando direto ignora o prompt de revisão. Verifique a origem antes de executá-lo.
Instruções da origem · Visualização somente leitura
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.
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
How to CONFIRM a Hit (avoid false negatives)
The positive signal is a privileged field you injected actually PERSISTING — not a 200 on the write. After sending the extra field, GET/re-read the object (or hit a privileged endpoint) and confirm the value changed: role is now admin, isAdmin/verified is true, balance/price reflects your value. The write succeeding while the field silently reverts is a false positive.
Two-request proof, always: (1) baseline read shows the original value, (2) update with the injected field, (3) re-read shows it changed AND ideally a behaviour change (you can now reach an admin route, checkout at the lowered price, skip verification). Echoed-back-in-response is weaker than a re-read; an authorization effect is strongest.
Discover the real field names first: diff the response body (which often exposes more fields than the request accepts) and use Arjun/param-miner — guessing one name and getting a 200 proves nothing.
Do NOT conclude negative until you have tried ALL of these:
Nested/relationship forms: {"role":"admin"} vs {"user":{"role":"admin"}} vs owner_id/organization_id/team_id foreign keys.
Both creation (POST /register) and update (PUT/PATCH) flows — mass assignment often only works at one.
JSON body, form-encoded, and query duplication; arrays vs scalars.
Confirm at a DIFFERENT privilege boundary (re-read as the same user, then verify the elevated capability actually works).
A reverted value on re-read, or a server-managed field ignored at persistence, means NOT vulnerable — verify persistence before reporting.
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