Mass Assignment & Excessive Data Exposure in REST & GraphQL
How OWASP API3:2023 Broken Object Property Level Authorization (mass assignment and excessive data exposure) happens and how manual testers exploit and fix it.
API Security · By Thimmagurudu Bathini, CTO · Published · 5 min read
Understanding OWASP API3:2023 Property Flaws
OWASP API Security Top 10 merged Excessive Data Exposure and Mass Assignment into Broken Object Property Level Authorization (API3:2023). In practice, this means an API either returns internal database fields like password hashes and admin flags in JSON responses—or lets a user overwrite role, balance, or is_verified by adding extra keys to a PUT/PATCH request.
PATCH /api/v1/users/me HTTP/1.1
Authorization: Bearer <standard_user_jwt>
Content-Type: application/json
{"display_name": "Asha", "role": "admin", "is_verified": true}
# Secure API ignores or rejects privileged fields via allowlisted schemaMass Assignment vs. Excessive Data Exposure
| Flaw Type | Real-World Example | Fix Pattern |
|---|---|---|
| Mass Assignment | Sending {"role":"admin"} or {"plan":"enterprise"} in profile PATCH | Bind requests to explicit allowlisted DTO/schema fields |
| Excessive Exposure | GET /api/users/123 returns internal notes, PII, or MFA secrets | Serialize responses through role-specific output DTOs |
| GraphQL Field Leaks | Nested queries expose User.internal_flags or billing fields | Enforce field-level authorization inside GraphQL resolvers |
Probing Undocumented JSON & GraphQL Fields
- Inspect GET responses across every role for hidden or sensitive object properties not shown in the UI.
- Copy read-only fields from GET responses into POST/PUT/PATCH payloads to test for mass assignment.
- Test GraphQL mutations and nested object queries for unauthorized field reads and updates.
- Check ORM auto-binding settings (Rails strong params, Mongoose/Sequelize, Spring @RequestBody).
Enforcing Strict Input/Output DTO Schemas
Never pass raw request JSON directly into ORM update() calls; define separate input and output schemas per endpoint and role.
Eliminate API3:2023 property-level leaks with manual API VAPT from ₹36,000 + 18% GST. Request a scoped proposal →
API3 Property Authorization Questions
Why do scanners miss mass assignment?
Scanners don't know which undocumented JSON property names (like is_admin or credit_limit) your backend model accepts.
Do you need OpenAPI/Postman collections to test this?
Sharing Postman/OpenAPI specs speeds up discovery, and we also inspect live UI traffic and error messages.