Bulk Endpoint Object Scoping
Verify that endpoints accepting lists of identifiers apply ownership checks to every item, not just the first
Use when: an endpoint takes an array of ids in the query or body, such as fetch-many, delete-many or update-many
Avoid when: the API processes exactly one identifier per request, where bulk behaviour does not exist
Procedure
- Identify every endpoint accepting an array, collection or batch payload of identifiers.
- Build a mixed list containing items you own and items from your second test account, ordered both ways.
- Send the mixed list and compare the response against expectations: refuse entirely or return only your own items.
- Check partial-success behaviour, since an endpoint that silently skips unauthorized items may still leak their existence.
- Test write operations in bulk, where a single unauthorized item can modify data across accounts.
- Record per-item handling so the report can state whether the gap is leakage, modification or both.
Signals
- A mixed list returns every item including those owned by the other test account.
- The response reports per-item status codes that reveal whether an unauthorized item exists.
- Bulk update applies to all items after validating only the first one.
- Deleting in bulk removes objects belonging to another account without error.
Patterns
1. Mixed batch
ids=[mine, mine, peer] expected=refuse-all or mine-only
observed=all three returned -> finding
2. Existence leak
per-item result: {id: 404} for unknown, {id: 403} for peer-owned
-> 403 vs 404 distinguishes existence, report as information leak
3. Result row
endpoint=POST /api/items/fetch items=3 peer_items=1 leaked=1 mode=full-disclosure
Pitfalls
- Testing a homogeneous list, which cannot reveal whether per-item checks exist at all.
- Ignoring the response's per-item detail, which often leaks existence even when data is withheld.
- Assuming bulk write shares the read path's checks, when the two are frequently implemented separately.
Done when
- Mixed lists have been tested in both orders for read and write endpoints with per-item outcomes recorded.
- The response is classified as full leak, existence leak, partial success or clean refusal.