● THREAT ADVISORY
CyberInsightsGlobal cybersecurity news, practical analysis & security knowledge
Submit a Tip

Broken Object-Level Authorization (BOLA) in APIs: How to Find and Fix IDOR

Editorial illustration for Broken Object Level Authorization BOLA in APIs

Executive Summary

  • Who is affected. Teams building APIs that return or modify user-owned records.
  • What to do first. Enforce server-side authorization for the caller, action, and specific record.
  • How to verify. Use separate authorized test accounts to confirm legitimate access succeeds and cross-account access is denied.

CyberInsights Today · Educational bulletin · By Harpreet Singh
Sources checked November 8, 2026. OWASP documents BOLA in its 2023 API Security Top 10. This bulletin covers a vulnerability class. A disclosure date, affected or fixed versions, CVE, CVSS score and exploitation status would apply to a specific incident or product advisory.

Updated . Added a shared-invoice refund test based on reader feedback.

Summary. A user can be allowed to open an invoice screen and still be forbidden from opening a particular invoice. If your API checks the login but skips that second decision, another customer's records could be exposed or changed.

What goes wrong

Authentication establishes who is calling. Authorization decides what that caller can do. An object is a record or resource such as an invoice, file, or support ticket. Broken object-level authorization (BOLA) happens when the API accepts a reference to an object and fails to check the caller's permission for the requested action on that exact object. Insecure direct object reference (IDOR) is a common way this flaw appears. OWASP API Security Top 10, OWASP IDOR Prevention Cheat Sheet

Picture a billing portal with two customer accounts. A regular user from the first customer is allowed to use the invoice API. If the user can obtain a reference to an invoice belonging to the second customer and the endpoint loads it by reference alone, the request may expose the second customer's invoice. References can appear in links, request bodies, exports, or other API responses. A random identifier makes blind guessing harder. The authorization decision is still required every time the object is used. OWASP IDOR Prevention Cheat Sheet

Conceptual diagram. An invoice request crosses a customer boundary. The example uses fictional accounts.
Signed-in Customer A user → requests a Customer B invoice
  • Vulnerable path. Check the session → look up the invoice by reference → return Customer B’s invoice.
  • Protected path. Check the session → check permission for this invoice and action → deny before returning data.

Check your exposure and set a priority

Start with endpoints that accept an object reference. Include downloads, exports, nested resources, bulk actions and background jobs. Check whether each handler uses trusted identity and tenant context from the session or token, enforces the intended role and action, and scopes the object lookup or performs an equivalent policy check. Review endpoints across supported deployments and API versions. A single route that skips the shared check is enough to expose a record. OWASP API Security Top 10

Prioritize cross-customer access to sensitive records and actions that change or delete data. A readable invoice can disclose commercial or personal information. Unauthorized changes can corrupt billing records or disrupt operations. Consider what the caller can reach, how easily references are exposed, and how many records or tenants are in scope. An incident conclusion requires evidence from the affected environment.

Contain the exposure and fix the authorization check

  1. Contain first. If you confirm a public-facing route exposes protected records, disable the affected action or restrict it to an authorized administrative workflow while you deploy the fix. Confirm the control also covers aliases and alternate clients. Rate limits can slow enumeration while containment is in place.
  2. Enforce the rule on the server. Default to denial and evaluate the authenticated identity, the requested action and the specific object. Scope data access to the caller's allowed tenant and records. Where sharing or delegation is supported, enforce those rules explicitly. Apply the same policy to downloads and asynchronous workers, including when they generate or serve the result. OWASP API Security Top 10
  3. Deploy to every affected path. For your own API, release the code or policy fix across every live version. For a third-party product, use its advisory to identify the supported fixed build. An edge block can buy time while you deploy the application fix.

Investigate and verify

Correlate application audit logs, gateway request IDs and backend access or mutation records. Look for a caller repeatedly trying distinct object references and for successful requests involving records outside the caller's permissions at the time. Account for legitimate delegates and service accounts. Denials can show attempted access. An HTTP success alone is also insufficient because the response may contain an error or empty result. Compare it with the authorization decision and evidence of actual data return or state change. Preserve available evidence without collecting tokens or full sensitive response bodies.

In an authorized test environment, create synthetic records under two test tenants. Confirm the intended owner can read and update its record, an ordinary user in the other tenant cannot do either, and an explicitly authorized delegate can only perform its allowed actions. Repeat for list, download, bulk and background paths. Check response bodies, stored state and audit events. After deployment, confirm every production instance runs the corrected release and repeat a limited approved smoke test with test records. Add these checks to the regression suite. OWASP IDOR Prevention Cheat Sheet

Test refund permission on a shared invoice

In a test environment, give two test accounts access to read the same refundable invoice. Grant only one account permission to refund it. Confirm that both accounts can open the invoice. Submit the refund request as the viewer first. The API should deny it, leave the invoice and payment records unchanged, and queue no refund. Then submit the request as the authorized account and verify that the test refund succeeds.

This catches a refund endpoint that reuses the invoice read check. The server must authorize the refund action on that invoice. If the viewer’s role should never be able to use the refund function, the same test also checks function-level authorization. OWASP API1:2023 · OWASP API5:2023

Takeaway. For each operation, ask whether this caller can perform this action on this exact record. Verify both the allowed and denied paths before closing the issue.

More in CyberInsights Today.

References

This article moved from WAFProtect to CyberInsights on November 21, 2026. Its former copy is unpublished.