Short answer: broken object level authorization (BOLA) is an API flaw where the server checks that you are logged in but not that the object you asked for belongs to you, so changing one ID returns another user’s data. Mass assignment is its property-level sibling, now filed under OWASP API3:2023.

On API engagements, the first thing we test is whether one account can read or change another account’s objects by swapping an ID. The second is whether the API accepts fields the interface never sends. Both checks need two accounts and a tester comparing responses, and both are part of every web application or API test we run, typically 5 to 10 tester-days.

What is broken object level authorization (BOLA)?

BOLA happens when an endpoint takes an object ID from the client and acts on it without checking that the caller may touch that object. OWASP ranks it API1:2023, the first risk in the OWASP API Security Top 10, and rates it easy to exploit and widespread. The identifier can be a sequential number, a UUID or a string, and it can sit in the path, the query string, a header or the JSON body.

BOLA is the API name for what web testers have long called insecure direct object reference (IDOR). The matching weakness is CWE-639, Authorization Bypass Through User-Controlled Key.

The line between BOLA and broken function level authorization (BFLA) matters when you read a report. With BOLA, the user may call the endpoint and the violation happens at the object: your token, someone else’s invoice. With BFLA, the user should not reach the function at all, such as a customer calling an admin route.

What is a mass assignment vulnerability?

A mass assignment vulnerability exists when an API takes the request body and binds every key it finds to an internal object, so a client can set properties it was never meant to control. The weakness is CWE-915, Improperly Controlled Modification of Dynamically-Determined Object Attributes.

In the 2019 OWASP list, mass assignment was API6. The 2023 edition merged it with excessive data exposure into API3:2023 Broken Object Property Level Authorization: the read side returns properties the user should not see, the write side lets the user change them. Typical targets are role, account status, price, owner or tenant ID and credit limits.

Why we test them together: BOLA asks “is this object yours?” and mass assignment asks “is this field yours to change?”. An API can pass one and fail the other, so we check both in the same pass.

Comparison of BOLA, mass assignment and BFLA: what the attacker changes, an example, where the fix belongs and how a tester proves each one
BOLA, mass assignment and BFLA need three different server-side fixes, and each one is proven by a different test: two accounts, an added field read back, or a lower role calling the route.

How do BOLA and mass assignment get into an API?

They come from a few design habits we see on most APIs we test:

  • The client decides which object: the API trusts the ID in the request instead of deriving access from the session.
  • Authorization stops at the endpoint: middleware confirms a valid token and a role that may call the route, then the handler loads the record by ID with no ownership or tenant filter in the query.
  • The request body becomes the model: the handler passes the whole JSON object to an update method, so any column with a matching name is writable.
  • Side paths lag behind: the main endpoint gets the check; the export, bulk, GraphQL or older-version route does not.

A fix that isn’t one: comparing the user ID in the token with the ID in the URL is not a fix. OWASP says this covers only a small subset of cases. Many objects are not owned by a user ID directly: an invoice belongs to a tenant, a payment to an account with several members. The check has to follow your ownership model.

What do BOLA and mass assignment requests look like?

Illustrative, redacted requests on example.com: the pattern a tester looks for, not a working exploit.

FlawExample request (illustrative, redacted)ImpactFix
BOLA, readGET /v1/invoices/<id of user B> sent with user A’s tokenAnother customer’s billing data disclosedFilter the query by the tenant from the session
BOLA, writePATCH /v1/addresses/<redacted> on an address owned by another accountTampering, redirected deliveries or payoutsSame ownership check on every write and delete
BOLA across tenantsX-Org-Id: <other org> added to a normal list requestOne customer reads another customer’s recordsCheck the tenant ID against the user’s memberships on the server
BOLA on a side pathGET /v1/invoices/<id>/pdf after only the main endpoint was fixedThe same data leaks through exportOne shared authorization layer for all routes
Excessive data exposure (API3, read)GET /v1/users/me returns "role" and "credit_limit" the app never displaysInternal fields disclosed and named for a mass assignment attemptResponse schema per role
Mass assignment, privilegePATCH /v1/users/me with {"name":"<redacted>","role":"admin"}Privilege escalation to adminAllowlist writable fields per role
Mass assignment, business valuePOST /v1/orders with an added "unit_price": 1Fraud through client-set prices or discountsCompute prices on the server

How do we test for BOLA and mass assignment in an API penetration test?

We test object and property authorization by hand, account against account, in this order:

  1. Accounts first: at least two accounts in the same role and one in every other role, in two tenants if the platform is multi-tenant. Without them, BOLA testing is guesswork.
  2. Endpoint map: the OpenAPI file plus routes from captured traffic, because undocumented and older routes are where checks go missing.
  3. Swap and compare: accounts A and B create objects; with B’s token we request A’s objects on every verb (read, update, delete, export) and on nested routes, then repeat across roles and tenants.
  4. Property tampering: we add fields seen in responses or docs to write requests (role, status, owner, price) and read the object back to see what stuck.
  5. Minimal-impact proof: we use our own test data where we can and revert changes at once. Critical vulnerabilities are reported while the test is still running.
  6. Retest: we replay the original requests and the side paths. A retest is available after fixes; whether it’s included depends on the engagement.

Each extra role adds combinations: an endpoint can work for an admin and fail for a standard user or another tenant. That is why roles and tenants weigh heavily in an API penetration testing quote; the same checks run on the web side in web application penetration testing. To prepare, see our API penetration testing checklist.

PATCH /v1/users/me HTTP/1.1
Host: api.example.com
Authorization: Bearer <redacted>
Content-Type: application/json

{"display_name": "Test User B", "account_tier": "enterprise"}

HTTP/1.1 200 OK
{"id": "<redacted>", "display_name": "Test User B", "account_tier": "enterprise"}

Redacted request from a test of this type (illustrative): the app never sends the tier field, yet the API accepted it.

Why can a vulnerability scan miss BOLA?

A scanner can miss BOLA because the vulnerable response looks correct: HTTP 200 and well-formed JSON. To see the flaw, a tool has to know who owns which record and compare what two accounts can reach. That is business context, not a signature.

Mass assignment is similar: a tool can add parameters, but it can’t tell that credit_limit is a field a customer must never control. In the fintech case study below, the client’s automated scans had come back clean before our manual test. More on the difference in penetration testing vs vulnerability scanning.

From our testing: a profile field the interface never sent

In a grey-box API test, we started with a standard user account and captured the profile save request. In the user profile, the backend accepted additional parameters that were not visible in the application interface. After manually adding one of the fields to the request, the tester could change a value that only the system had controlled before. The mechanism was classic mass assignment: the update handler bound the whole JSON body to the user object, so any property with a matching name, including names visible in the profile the API returned on read, was writable. The automated tool did not know the business meaning of that parameter. For the business, a standard user could rewrite data the platform trusted only the system to set. The client introduced an allowlist of fields that users can modify, enforced on the server. On retest we replayed the original request and the same field on the other requests that update the user object, and the system-controlled value no longer changed.

What does a BOLA finding look like in a pentest report?

In our sample penetration test report, the highest-severity finding is BOLA. This is its summary:

FieldValue
IDF-01
TitleBroken object level authorization in the invoice API
SeverityHigh (CVSS v3.1 8.1, CVSS v4.0 8.6)
CWECWE-639: Authorization Bypass Through User-Controlled Key
OWASP categoryA01:2025 Broken Access Control; API1:2023 Broken Object Level Authorization
Affected endpointsGET /v1/invoices/{id}, PATCH /v1/invoices/{id} and GET /v1/invoices/{id}/pdf on api.example.com
Status after retestClosed

Excerpt from our sample penetration test report (fictional client). The full finding, with fictional requests and responses, is on the sample penetration test report page. You can rebuild the score from the vector with our CVSS calculator.

Its remediation is the one we write most often: a server-side ownership check on every invoice read, update and export, with lookups filtered on the tenant identifier from the session, never from the request body or URL.

In our API penetration testing case study for a high-volume fintech platform, two senior pentesters spent 10 tester-days on the REST API against every role. By manipulating the Transaction ID in the API call, User A could view the full transaction history and sensitive data of User B.

How do you fix BOLA and mass assignment?

Fix BOLA with an ownership check where data is loaded, and mass assignment by deciding on the server which fields a client may write:

  • Authorize every object in the data access layer: derive user, account and tenant from the session and include them in the query, so a lookup for someone else’s ID returns nothing.
  • Centralize the policy: one authorization function every route, export job and resolver calls, deny by default.
  • Treat random IDs as hardening, not a fix: UUIDs and rate limits make guessing harder, but IDs leak through links and logs.
  • Allowlist writable fields: bind each request to an input schema per action and role and keep system fields out of client input. The OWASP Mass Assignment Cheat Sheet covers framework options.
  • Write authorization tests: user B requests user A’s object and expects 403 or 404; a forbidden field is posted and must be ignored. Run them in CI and block releases that fail. The OWASP Authorization Cheat Sheet covers the patterns.

What most guides miss: the partial fix we retest most often covers the endpoint named in the report while a sibling path keeps the old behavior. Our business logic penetration testing case study shows the same pattern in an approval workflow: the first fix blocked the main order-editing endpoint, but retesting found the same outcome through the line-item import function, so the finding was marked partially remediated.

When do you need a manual API test for BOLA and mass assignment?

  • Choose a grey-box API penetration test when your API serves more than one customer, tenant or role. For multi-tenant products, see SaaS penetration testing.
  • Choose a retest when a report already lists BOLA. Replaying side paths shows whether the fix is complete.
  • We advise against relying on a scan alone when your objects have owners: a clean scan says nothing about whether user B can read user A’s invoice.
  • Skip black-box-only testing if BOLA is your main worry. Without accounts in two roles or tenants, nothing gets compared.

Our verdict: if your API has two or more roles or tenants, have object and property authorization tested by hand with two accounts per role before every major release. It is the check we would never cut from an API scope.

How much does an API test for BOLA cost and how long does it take?

BOLA and mass assignment checks are part of a standard web application or API penetration test with us, priced at $2,500 to $5,500 per application or API and typically 5 to 10 tester-days. A small app or API with 1 to 3 roles starts from $2,500, and multi-tenant scopes go up to $5,500. The price is fixed for the agreed scope, confirmed in writing before testing; work outside it can cost more. Prices exclude VAT where applicable. See our penetration testing pricing page.

To scope it, we need the endpoint count or OpenAPI file, roles, tenants and authentication method. Our API security checklist lists controls to check first.

Fixed-price quote

Want your API tested for BOLA and mass assignment?

Tell us your endpoints, roles and tenants and we’ll send a quote in tester-days, fixed for the agreed scope. Web application and API tests start at $2,500.

Get a fixed-price quote

Sources: OWASP API Security Top 10 2023, API1:2023 Broken Object Level Authorization and API3:2023 Broken Object Property Level Authorization; OWASP Authorization Cheat Sheet; OWASP Mass Assignment Cheat Sheet; CWE-639; CWE-915; checked November 2026.

Pentestica - Your Trusted Partner in Penetration Testing

The Pentestica penetration testing team: 25 certified senior pentesters (OSCP, OSCE, CISSP) with 10+ years of offensive security operations and 500+ penetration tests behind them. Our testing is aligned with OWASP, PTES and NIST SP 800-115.