mass-assignment
Skill22 starsChanged 6 months agoMITView on GitHub
Use when testing APIs and web frameworks for mass assignment vulnerabilities where user-controlled request body fields are bound directly to model attributes without a field allowlist. Trigger on: ORM update/create endpoints, REST APIs accepting JSON body, Rails strong parameters, Django model forms, Laravel fillable/guarded, Node.js Mongoose/Sequelize, PUT/PATCH requests, registration endpoints, profile update endpoints, GraphQL mutations. Detects privilege escalation via role/admin/isAdmin fields, plan upgrades via subscription fields, and horizontal access via ownerId/userId injection.
3 other projects use a version of this.
Adopted by
Most recently taken up by
- conjure-3301/skillstheir own version, first seen Aug 17, 2026
- thejefflarson/soundchecktheir own version, first seen Jul 31, 2026
- KaanBicaklar/mona-sast-skillstheir own version, first seen Jul 9, 2026
Other versions3 projects use a version of this.
Word for word · 0
None found.
Edited · 0
None found.
Wrote their own version · 3
- thejefflarson/soundcheck★ 20same name
- KaanBicaklar/mona-sast-skills★ 2same name
- conjure-3301/skills★ 0same name
How matches are found. Word for word: the exact same text. Edited: shares passages with this file (“99% same” means 99% of its five-word phrases also appear here; 10% or more counts). Their own version: similar meaning, or, weakest, the same name. We can’t tell which project had it first. Projects are counted among the 200 most-starred candidates, and mentions are links to the repository we found, up to 50 per site, so both counts are a floor.
In this repository353 other files it gives its agents.
- CLAUDE.mdCLAUDE.md
- bb-hugeSkill
- 2fa-multi-factor-bypassSkill
- 401-403-bypass-techniquesSkill
- Access Control — Complete Deep DiveSkill
- active-directory-acl-abuseSkill
- active-directory-asreproastingSkill
- active-directory-certificate-servicesSkill
- active-directory-dcsync-attackSkill
- active-directory-full-attack-chainSkill
- active-directory-golden-ticketSkill
- active-directory-kerberoastingSkill
- active-directory-kerberos-attacksSkill
- ad-asreproast-attackSkill
- ad-assessmentSkill
- ad-cs-esc1-abuseSkill
- ad-dcsync-attackSkill
- ad-pass-the-hashSkill
- advanced-sql-injection-sqliSkill
- ai-agent-tool-abuse-and-privilege-escalationSkill
- ai-data-extraction-via-ssrfSkill
- ai-data-poisoning-model-skewingSkill
- ai-data-poisoningSkill
- ai-jailbreak-obfuscation-ciphersSkill
- ai-jailbreak-prompt-injectionSkill
- ai-jailbreak-system-promptsSkill
- aikido-triageSkill
- ai-ml-securitySkill
- ai-pair-hunting-with-claudeSkill
- ai-prompt-leakingSkill
- ai-redteamSkill
- ai-report-writing-guardrailsSkill
- amend-skillSkill
- amsi-bypassSkill
- analyze-cveSkill
- android-apk-reverse-engineeringSkill
- android-pentesting-tricksSkill
- anti-debugging-techniquesSkill
- api-auth-and-jwt-abuseSkill
- api-authentication-bypassSkill
- api-authorization-and-bolaSkill
- api-enumeration-fuzzing-discoverySkill
- api-mass-assignment-exploitationSkill
- api-rate-limit-bypass-techniquesSkill
- api-recon-and-docsSkill
- api-secSkill
- api-securitySkill
- API Testing — Deep DiveSkill
- arbitrary-write-to-rceSkill
- authbypass-authentication-flawsSkill
- auth-bypassSkill
- Authentication — Complete Deep DiveSkill
- auth-secSkill
- authz-bypassSkill
- av-edr-evasion-techniquesSkill
- aws-cloud-penetration-testingSkill
- aws-cognito-abuseSkill
- aws-iam-privilege-escalationSkill
- aws-imdsv2-ssrf-bypassSkill
- aws-metadata-ssrf-exploitationSkill
- The first 60 shown.
The file
We split this skill into the rules it gives an agent
2 rules. About 0 are common, 1 is distinctive, and 1 is very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈1
Distinctive · estimate
This author's own choices. Worth a look.
1
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Very specific: line 32
PUT/PATCH/POST endpoints that update model records
- Distinctive: line 45
Add extra fields to the request body — observe if they're accepted silently.
≈ “Common” is an estimate: at least 1 in 5 of the 213,897 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
Mass Assignment
What Is Broken and Why
Frameworks that automatically bind request body parameters to model attributes (Rails,
Laravel, Django, Mongoose, Sequelize) allow attackers to set fields that were never
meant to be user-modifiable. A profile update endpoint intended to accept {name, email}
will also accept {role: "admin", plan: "enterprise", ownerId: 999} if the server
doesn't explicitly allowlist accepted fields.
Key Signals
- PUT/PATCH/POST endpoints that update model records
- JSON bodies passed to ORM
update(),create(),save(), orassign()calls - Registration or profile endpoints in Rails, Laravel, Django, Express apps
- API responses that reveal field names not expected in requests (leak model schema)
- GraphQL mutations with
inputtypes - Endpoints where adding extra fields returns 200 (not 400 Bad Request)
Methodology
- Identify PUT/PATCH endpoints for user profile, settings, or resource updates.
- Intercept a normal request; examine which fields are accepted.
- Inspect API responses and other endpoints to discover undocumented field names
(
role,admin,isAdmin,verified,plan,credits,ownerId,orgId). - Add extra fields to the request body — observe if they're accepted silently.
- Attempt privilege escalation: inject
"role": "admin"or"isAdmin": true. - Attempt horizontal access: inject
"userId"or"ownerId"pointing to another user. - For registration endpoints: try setting
"emailVerified": true,"credits": 9999. - Fuzz with common sensitive field names from framework conventions.
Payloads & Tools
// Profile update — attempt privilege escalation
PATCH /api/users/me
{"name": "test", "email": "test@example.com", "role": "admin", "isAdmin": true}
// Registration — attempt auto-verification and credit injection
POST /api/register
{"email": "x@x.com", "password": "pass", "emailVerified": true, "credits": 9999,
"plan": "enterprise", "trialExpires": "2099-01-01"}
// Resource update — attempt ownership change (IDOR via mass assignment)
PATCH /api/posts/42
{"title": "new", "ownerId": 1, "userId": 1}
// Nested object injection (common in JSON APIs)
PUT /api/profile
{"name": "x", "address": {"city": "x"}, "billingPlan": {"tier": "enterprise"}}
// GraphQL mutation with extra input fields
mutation {
updateUser(input: {name: "x", role: "admin", isAdmin: true}) { id role }
}Common sensitive field names to try:
role, roles, isAdmin, admin, superuser, verified, emailVerified,
plan, tier, subscription, credits, balance, ownerId, userId, orgId,
organizationId, groupId, permissions, scopes, approved, active,
banned, locked, passwordResetRequired, mfaEnabled, apiKey, secretBypass Techniques
- Nested objects: Try
{"billing": {"plan": "enterprise"}}if flat fields are blocked. - Array assignment:
{"roles": ["admin", "user"]}for role arrays. - Underscore variants:
_role,__role,role_idfor alternate field names. - camelCase vs snake_case: Try both
isAdminandis_admin. - Partial allowlist bypass: Some frameworks check top-level but not nested fields.
- GraphQL alias injection: Extra fields in
inputtype if server doesn't validate schema strictly.
Exploitation Scenarios
Privilege escalation via role injection:
Setup → Rails app uses User.update(params[:user]) without strong parameters.
Trigger → Send PATCH /profile with {"name":"x","role":"admin"}.
Impact → Attacker account elevated to admin; full application access.
Free premium tier via registration:
Setup → Laravel registration with unguarded User model.
Trigger → POST register with {"email":"x","password":"x","plan":"premium","credits":10000}.
Impact → Free premium access and inflated credits.
Horizontal access via ownerId change:
Setup → Node/Mongoose Document.findByIdAndUpdate(id, req.body).
Trigger → PATCH document with {"title":"x","ownerId":"VICTIM_ID"}.
Impact → Attacker's document transferred to victim — or attacker claims victim's document.
False Positives
- Extra fields returned as 400 with validation error — server validates allowed fields.
- Fields accepted in request body but ignored (no change in response/DB) — check DB directly.
Fix Patterns
// Node.js — explicit allowlist with lodash pick
const allowed = ['name', 'email', 'avatar'];
User.findByIdAndUpdate(id, pick(req.body, allowed));
// Express/Mongoose — never pass req.body directly to ORM
// Bad: User.updateOne({ _id }, req.body)
// Good: User.updateOne({ _id }, { name: req.body.name, email: req.body.email })# Django — use form or serializer to allowlist fields
class UserSerializer(serializers.ModelSerializer):
class Meta:
fields = ['name', 'email'] # never use fields = '__all__'Related Skills
Mass assignment is a specific form of [[authz-bypass]] where the bypass is structural rather than a missing check. When the injected field is an object ID pointing to another user's data, it becomes [[bola-idor]]. Discovering which hidden fields exist often requires [[web-fingerprinting]] of the framework (Rails, Laravel, Django leave recognizable patterns).
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

