OWASP API Security Top 10 Explained with Examples

The OWASP API Security Top 10 risks — BOLA, broken authentication, property-level authorization, resource consumption and more — with fixes for each.

Published December 6, 2026

APIs expose business logic and data directly, without the guardrails a server-rendered UI sometimes provides by accident. That is why OWASP maintains a dedicated API Security Top 10. Most items are about authorization and resource limits, not exotic exploits, which makes them very fixable with consistent patterns.

The concept

The most common API flaw is Broken Object Level Authorization (BOLA): an endpoint returns or modifies an object by ID without checking the caller owns it. Close relatives are broken object property level authorization (returning sensitive fields or accepting writes to fields like isAdmin) and broken function level authorization (normal users calling admin endpoints).

Other categories cover broken authentication, unrestricted resource consumption (no rate limits, unbounded page sizes, expensive queries), unrestricted access to sensitive business flows (bots buying all tickets), SSRF, security misconfiguration, improper inventory management (forgotten v1 endpoints, undocumented debug APIs) and unsafe consumption of third-party APIs.

The list

Risk (2023 list)ExampleFix
API1 Broken Object Level AuthorizationGET /accounts/{id} for any idOwnership checks / scoped queries
API2 Broken AuthenticationWeak tokens, no lockoutStandard auth (OIDC), rate limits, short tokens
API3 Broken Object Property Level AuthorizationResponse leaks passwordHash; PATCH sets roleExplicit response schemas; write allow-lists
API4 Unrestricted Resource Consumption?limit=1000000Rate limits, max page size, timeouts
API5 Broken Function Level AuthorizationPOST /admin/users as normal userRole checks per route
API6 Unrestricted Access to Sensitive Business FlowsBots scalping inventoryBot detection, per-user limits
API7 SSRFwebhookUrl=http://169.254.169.254URL validation + network controls
API8 Security MisconfigurationVerbose errors, permissive CORSHardened defaults
API9 Improper Inventory ManagementOld /v1 without auth fixesAPI catalogue, retire old versions
API10 Unsafe Consumption of APIsTrusting partner API data blindlyValidate third-party responses

From the OWASP API Security Top 10 (2023 edition).

Where checks belong

ClientAPI gatewayServiceDBGET /accounts/77 (token user 12)authn + rate limitforward with user=12SELECT … WHERE id=77 AND owner=12no rows404
Authentication at the edge, object authorization in the service.

Baseline

  1. Inventory every API and version (OpenAPI specs)
  2. Enforce authn at the gateway; authz in services per object
  3. Define response schemas so only intended fields leave
  4. Rate limit and cap page sizes and query complexity
  5. Test with automated BOLA and fuzzing tests
An API security baseline.

Practical examples

Explicit response serializer

Never return ORM objects directly.

class AccountOut(BaseModel):
    id: int
    name: str
    plan: str
    # passwordHash, internalNotes intentionally absent

@app.get("/accounts/{account_id}", response_model=AccountOut)
def get_account(account_id: int, user=Depends(current_user)):
    return repo.get_owned(account_id, owner_id=user.id) or raise_404()

Write allow-list against mass assignment

Only these fields can be updated.

const ALLOWED = ['name', 'avatarUrl', 'timezone']
const updates = Object.fromEntries(Object.entries(req.body).filter(([k]) => ALLOWED.includes(k)))
await users.update(req.user.id, updates)

Cap page size

Prevent resource exhaustion through huge limits.

limit = min(int(request.args.get("limit", 20)), 100)

Common mistakes

  • Returning entire database models in API responses.
  • Relying on the gateway for object-level authorization it cannot know about.
  • Unbounded limits, filters and GraphQL query depth.
  • Forgotten old API versions still in production.

Key takeaways

  • Authorization at object, property and function level is the core of API security.
  • Explicit schemas control what goes in and out.
  • Limit resource consumption everywhere.
  • Keep an inventory and retire old versions.

FAQ

Does an API gateway solve API security?

It handles authentication, rate limiting and some validation; object-level authorization still belongs in the service that knows the data.

Does GraphQL change the risks?

The same risks apply, plus query depth/complexity limits and field-level authorization become critical.

How do I find shadow APIs?

Compare traffic logs and gateway routes against your documented OpenAPI inventory.

More Security articles