hunting-mass-assignment-and-property-authz

Solid

Hunt mass assignment and broken object-property authorization: handlers that bind a client request payload straight onto a record or model and let the caller write fields it should never control - role, is_admin, owner_id, tenant, price, balance, verified, status, or another user's foreign key. Covers auto-binding and hydration that take the whole payload, blocklist filters that miss a field, nested and relation fields that reopen the hole, type juggling that flips a flag, and read paths that return properties the caller should not see. Use when reviewing any create or update handler that maps request fields onto a persisted object. The payload field is the source, the record write is the sink, and the server-controlled property is the bug.

AI & Automation 4 stars 1 forks Updated yesterday MIT

Install

View on GitHub

Quality Score: 80/100

Stars 20%
23
Recency 20%
100
Frontmatter 20%
70
Documentation 15%
100
Issue Health 10%
80
License 10%
100
Description 5%
100

Skill Content

# Hunting mass assignment: which fields, not which object Broken object-level authorization asks whether the caller may reach *this object*. Mass assignment asks the next question: given an object the caller may write, which of its *fields* may they set? The bug is a handler that binds a request payload onto a record and trusts the client to send only the fields it should, so an attacker adds `"role":"admin"`, `"owner_id": <someone else>`, `"price": 0`, or `"verified": true` to a payload the endpoint was never meant to accept, and the framework writes it. You find it by listing what the client can put into the payload, following it to the record write, and asking which of those fields the server, not the client, is supposed to own. ## When to use - You are reviewing a create or update handler that maps request fields onto a persisted object. - The framework auto-binds or hydrates a payload onto a model, struct, or record. - Some properties of the object are meant to be server-controlled: privilege, ownership, tenancy, money, state, or verification flags. ## Scope check Test property writes only in systems you own or are authorized to test, with accounts that let you observe a privilege, ownership, or state change take effect. If you can't name the authorization, stop. ## The loop 1. **List the writable fields the client can reach.** For each create and update handler, determine how the payload becomes a record: an explicit field-by-field assignment, an allowl...

Details

Author
UnboundCompute
Repository
UnboundCompute/security-agent-skills
Created
5 days ago
Last Updated
yesterday
Language
N/A
License
MIT

Similar Skills

Semantically similar based on skill content — not just same category

AI & Automation Solid

hunting-broken-object-level-authorization

Hunt broken object-level authorization (BOLA, also called IDOR): endpoints that accept a client-supplied object reference - a numeric id, UUID, key, slug, filename, or an id nested in a request body or token - and read or mutate that object without checking the authenticated caller is entitled to it. Covers direct references, enumerable and guessable ids, references buried in nested or batch payloads, second-order ids stored then trusted later, and ownership checks that run on one path but not its siblings. Use when reviewing any API or handler that fetches or changes a record by an id the client controls. The reference is the source, the data access is the sink, and the missing owner binding is the bug.

4 Updated yesterday
UnboundCompute
API & Backend Featured

hunt-api-misconfig

Hunt API security misconfiguration — mass assignment, prototype pollution, HTTP verb tampering. Mass assignment: send {is_admin:true, role:admin, verified:true} on profile/account/reset endpoints — server blindly applies. JWT signature/crypto forging (alg:none, key confusion, kid/jku) is owned by hunt-jwt-crypto; this skill covers only non-crypto JWT handling. Prototype pollution: __proto__ injection in JSON merge / Object.assign / lodash _.merge → polluted prototype reaches sink (RCE in Node, XSS in browser). HTTP verb: GET-bypass-CSRF, X-HTTP-Method-Override, TRACE enabled. Detection: API responses with extra fields, JWTs in headers (decode at jwt.io). CORS misconfiguration (reflect-any-origin, null origin, subdomain-regex bypass, postMessage) is owned by hunt-cors. Use when hunting API misconfigs, mass-assignment, prototype pollution (JWT crypto → hunt-jwt-crypto).

3,709 Updated today
elementalsouls
API & Backend Featured

hunt-exceptional-conditions

Hunt mishandling of exceptional conditions — feed an endpoint malformed/unexpected input (wrong type, broken JSON, oversized field, null byte) and make it fail OPEN or leak internals: a verbose stack-trace / framework error page that discloses ORM internals, server file paths, library versions, or a language traceback. Use on any input-accepting endpoint (JSON APIs, forms, query params). Medium-High when the leak exposes internal structure that arms a deeper attack.

3,709 Updated today
elementalsouls