agentleFS
NoorQureshiNoorQureshi/SploitAgent/skills/api/api-mass-assignment/SKILL.md

api-mass-assignment

Skill26 starsChanged 31 days agoMITView on GitHub

Mass assignment / auto-binding privilege escalation. Load when an API binds JSON directly to a model (Rails, Spring, Django REST, Node/Mongoose), on signup/profile-update/create endpoints, or when responses expose fields you didn't send (role, isAdmin, balance, verified). Signals: ORM object binding, extra fields accepted silently.

2 other projects use a version of this.

Adopted by

Most recently taken up by

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
  1. Distinctive:

    Learn the object shape: read a GET response for the object — every returned field is a candidate writable property.

    line 31
  2. Very specific:

    Guess conventions: when fields aren't leaked: is_admin, admin, roleId, groups, permissions, account_type, tenant_id — try nested objects …

    line 36

≈ “Common” is an estimate: at least 1 in 5 of the 350,495 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.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
SKILL.md

Mass assignment (BOPLA)

When it applies

An endpoint deserializes client JSON straight into a data object without an allowlist of writable fields. You add sensitive properties the developer never meant to be client-writable.

Why it works

Frameworks that auto-bind request bodies to models will set any matching attribute unless explicitly restricted. If role, isAdmin, account_balance, email_verified, or user_id are bindable, you set them by just including them in the body.

Method

  1. Learn the object shape: read a GET response for the object — every returned field is a candidate writable property. Also mine JS, mobile apps, and API docs for hidden fields.
  2. Inject sensitive fields into create/update requests: {"username":"x","password":"y","role":"admin"} or "isAdmin":true, "verified":true, "balance":999999, "user_id":<victim>.
  3. Guess conventions when fields aren't leaked: is_admin, admin, roleId, groups, permissions, account_type, tenant_id — try nested objects too ({"role":{"id":1}}).
  4. Chain: set user_id/owner_id to a victim to combine with IDOR, or flip verified to skip email/2FA gates.

Gotchas

  • Extra fields silently ignored ≠ safe — confirm by reading the object back for your change.
  • Some frameworks need the exact case/nesting; mirror the GET response structure.
  • The writable field may only take effect on a specific endpoint/verb (create vs update).

Verify success

A privileged attribute you supplied is persisted — re-fetch the object and see role:admin, verified:true, or the elevated value reflected, and confirm the new capability works.

References

OWASP API Security Top 10 (2023) API3; framework strong-params/allowlist docs.

Download now (ZIP)

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
What did you use it for? e.g. Reviewing pull requests in a Rails app

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.