OWASP API Security ยท Threat Research

BOLA & BFLA: The API Vulnerabilities Your WAF Will Never Catch โ€” and How Runtime Enforcement Changes the Equation

๐Ÿ“… March 2026โฑ 10 min readโœ๏ธ ziriz Security Research
Broken Object Level Authorization (BOLA) and Broken Function Level Authorization (BFLA) sit at positions #1 and #5 in the OWASP API Security Top 10 โ€” not because they're new, but because they remain persistently, stubbornly difficult to detect. They are responsible for the majority of high-impact API breaches in production today. And they have one thing in common: they are structurally undetectable from the network perimeter.

What BOLA Is โ€” and Why It's So Dangerous

Broken Object Level Authorization occurs when an API endpoint returns data for a specific resource โ€” a user account, an order, a medical record, a bank transaction โ€” without verifying that the requesting identity is authorized to access that specific object.

The request is syntactically valid. The authentication token is legitimate. The endpoint exists. The only thing wrong is a single field: the object identifier in the URL or body belongs to someone else.

# Legitimate request โ€” user 4821 accessing their own profile
GET /api/v1/users/4821/profile
Authorization: Bearer <valid_token_for_user_4821>
โ†’ 200 OK  {"id": 4821, "name": "Alice", "email": "alice@corp.com"}

# BOLA attack โ€” user 4821's token accessing user 9003's profile
GET /api/v1/users/9003/profile
Authorization: Bearer <valid_token_for_user_4821>
โ†’ 200 OK  {"id": 9003, "name": "Bob", "email": "bob@bank.com", "ssn": "XXX-XX-XXXX"}
   BREACH: Unauthorized data returned โ€” no error, no log, no alert

From the WAF's perspective, both requests are identical. From the API gateway's perspective, both requests carry valid authentication. From the rate limiter's perspective, one request per object ID is normal traffic. Nothing in the perimeter stack can detect this.

Why BOLA Is So Prevalent

BOLA is widespread for a structural reason: most authorization frameworks check whether a user is authenticated to access an endpoint type, but leave object-level authorization to the application developer โ€” who often forgets, cuts corners under deadline, or makes assumptions about what an attacker would bother to try. In a large API surface with hundreds of endpoints and dozens of object types, a systematic BOLA vulnerability can go undetected for years while being actively exploited.

REAL-WORLD IMPACT

BOLA has been the root cause of some of the largest API breaches on record: the Optus breach (Australia, 9.8M records), the T-Mobile API breach (US, 37M accounts), and the Peloton incident (exposed workout and PII data for all users regardless of privacy settings) โ€” all fundamentally BOLA vulnerabilities where authenticated requests returned data belonging to other users.

What BFLA Is โ€” and Why It's Even Harder to Detect

Broken Function Level Authorization occurs when an API exposes privileged or administrative functions that regular users โ€” or AI agents โ€” can call because access controls were applied inconsistently, incompletely, or not at all at the function level.

BFLA is not about accessing the wrong data object. It's about calling the wrong operation entirely.

# Standard user account โ€” should only have read access
Token claims: {"role": "user", "id": 4821}

# BFLA attack โ€” regular user calling admin endpoint
DELETE /api/v1/admin/users/9003
Authorization: Bearer <valid_token_for_regular_user_4821>
โ†’ 200 OK  {"deleted": true}   โ† Account deleted. No authorization error.

# BFLA via AI agent โ€” over-permissioned agent calling privileged endpoint
POST /api/v1/internal/billing/override
Body: {"user_id": 9003, "charge": 0}
Authorization: Bearer <ai_agent_service_account_token>
โ†’ 200 OK  โ† Billing override executed. Agent was never supposed to reach this endpoint.

BFLA in the Age of AI Agents

BFLA has become dramatically more dangerous with the proliferation of AI agents. Agents are typically issued broad API credentials so they can flexibly access resources as the LLM decides they're needed. This means an agent service account often has access to many more API functions than any human user ever should โ€” and if the agent is manipulated via prompt injection, it may call privileged functions with legitimate credentials that were never intended for that purpose.

ATTACK SCENARIO

A finance AI agent is given a service account with read access to billing APIs for reporting purposes. The billing API also has a /override endpoint that wasn't access-controlled at the function level. A prompt injection in a processed invoice instructs the agent to "zero out all outstanding invoices." The agent calls the override endpoint with its legitimate credentials. Every invoice in the system is cleared. The WAF sees valid, authenticated API calls throughout.

The Detection Gap: Why Your Current Stack Misses Both

ToolCan Detect BOLA?Can Detect BFLA?Why Not?
WAFโŒ NoโŒ NoNo model of which user owns which object or which role can call which function
API GatewayโŒ NoPartialCan enforce endpoint-level auth, but not object-level ownership
Rate LimiterโŒ NoโŒ NoPer-object BOLA attacks stay under rate limits by design
Traffic Mirror / SIEMHeuristic onlyHeuristic onlyCan flag patterns but can't verify authorization context
SAST / DASTSome DASTSome DASTPoint-in-time scans; no runtime enforcement; can't test all object combinations
ziriz.ai Runtimeโœ… Authoritativeโœ… AuthoritativeRuntime instrumentation correlates identity claims with object access at the process level

How ziriz.ai Detects and Prevents BOLA/BFLA at Runtime

ziriz.ai's patent-pending runtime sensor instruments the application at the process level โ€” not at the network boundary. This gives it access to context that no perimeter tool can reconstruct:

BOLA Detection: Identity-to-Object Correlation

When a request arrives at an API endpoint, the ziriz.ai sensor simultaneously observes: the authenticated identity extracted from the JWT/token (user ID, role, tenant), the object ID being requested (from URL path, query parameters, or request body), and โ€” critically โ€” whether the application's own authorization logic validated that the requesting identity owns or has rights to that specific object.

This correlation happens at the runtime layer, inside the application's execution context โ€” not by guessing from network packets. The result is zero false positives: ziriz.ai only fires a BOLA alert when it observes an authorization decision mismatch, not when it sees a suspicious-looking URL pattern.

BFLA Detection: Function-Level Access Policy

ziriz.ai enforces function-level access control policies via runtime hooks on the API routing layer. Policies are expressed as: "the user role may not invoke the /admin/* path family" or "the ai-agent service account may not call any endpoint tagged write-privileged." These policies are evaluated synchronously at the runtime layer โ€” before the function handler executes, not after it returns a response.

# ziriz.ai BOLA detection event
[BOLA_DETECTED]
  endpoint:  GET /api/v1/users/9003/profile
  caller_id: user_4821 (from JWT sub claim)
  object_id: 9003 (from URL path param)
  ownership: MISMATCH โ€” 4821 โ‰  9003, no admin role
  action:    BLOCKED โ€” 403 returned before handler executed
  latency:   0.4ms

# ziriz.ai BFLA detection event
[BFLA_DETECTED]
  endpoint:  DELETE /api/v1/admin/users/9003
  caller_id: user_4821 (role: user)
  function:  admin:delete_user
  policy:    DENY โ€” role 'user' cannot invoke admin:delete_user
  action:    BLOCKED โ€” handler never called
  latency:   0.3ms

BOLA/BFLA in the AI Agentic Stack: The Amplified Risk

With AI agents now making API calls autonomously and at high frequency, the BOLA/BFLA risk surface has expanded by at least an order of magnitude. Consider the attack surface multiplication:

Runtime enforcement that correlates agent identity, object ownership, and function authorization โ€” all simultaneously, at the process level โ€” is the only architecture that can keep pace with this expanded risk surface.

Practical Steps: Hardening Against BOLA/BFLA Today

  1. Audit every GET endpoint that accepts an object identifier (user ID, account ID, order ID, document ID) in the URL or body โ€” and verify that each one explicitly checks whether the authenticated caller owns that object. Don't assume your framework does this for you.
  2. Audit every write/delete/admin endpoint for whether function-level access controls are enforced server-side โ€” not just hidden from the UI. Hidden endpoints are not protected endpoints.
  3. Audit your AI agent service accounts. List every endpoint each agent credential can reach. For any endpoint the agent doesn't strictly need, remove access. Apply least-privilege aggressively.
  4. Implement runtime authorization monitoring. Static audits catch known gaps. Runtime monitoring catches the gaps you haven't discovered yet โ€” and the ones introduced in next week's deployment.
  5. Test with an adversarial mindset at the object level. For every authenticated endpoint, ask: "What happens if I replace the object ID with another user's ID?" The answer should always be a 403 โ€” but often isn't.

Find your BOLA/BFLA exposure before attackers do.

The free ziriz.ai API Risk Assessment includes a full BOLA/BFLA gap analysis across your API surface โ€” using runtime instrumentation, not just traffic pattern analysis. No agents, no mirrors required.

Request Free BOLA/BFLA Assessment