← All articles

OWASP API Security Top 10 Explained with Real Testing Examples

The OWASP API Security Top 10 is the OWASP Foundation's list of the ten most critical security risks specific to APIs. The current edition, published in 2023, is led by Broken Object Level Authorization, Broken Authentication and Broken Object Property Level Authorization, and it covers authorization, resource limits, business flows, SSRF, misconfiguration, inventory and third-party API trust. Below, each item gets a plain-English definition, a test you can run against your own staging API, and the fix.

It's separate from the OWASP Top 10 for web applications, and authorization dominates: three of the ten entries are about who may touch what.

The OWASP API Security Top 10 (2023) at a glance

IDRiskWhat it looks like in practice
API1:2023Broken Object Level AuthorizationChange an ID, get someone else's record
API2:2023Broken AuthenticationWeak tokens, unthrottled login/OTP, accepted unsigned JWTs
API3:2023Broken Object Property Level AuthorizationAPI returns or accepts fields it shouldn't (role, is_admin)
API4:2023Unrestricted Resource ConsumptionNo limits on page size, uploads, batched operations or paid SMS sends
API5:2023Broken Function Level AuthorizationRegular user calls admin endpoints
API6:2023Unrestricted Access to Sensitive Business FlowsBots buying all stock, spamming referrals
API7:2023Server Side Request ForgeryAPI fetches a user-supplied URL, including internal ones
API8:2023Security MisconfigurationPermissive CORS, verbose errors, missing TLS, debug on
API9:2023Improper Inventory ManagementForgotten v1, beta and staging APIs still live
API10:2023Unsafe Consumption of APIsTrusting data or redirects from third-party APIs

What changed from the 2019 edition

Comparing the 2019 list with 2023: Excessive Data Exposure and Mass Assignment merged into API3:2023, because both come from missing property-level authorization. "Lack of Resources & Rate Limiting" became Unrestricted Resource Consumption. Injection and Insufficient Logging & Monitoring no longer have their own slots, and three new entries appeared: Sensitive Business Flows, SSRF and Unsafe Consumption of APIs.

API1:2023 Broken Object Level Authorization (BOLA)

What it is: the API takes an object ID from the client and doesn't check that the caller owns it. OWASP rates it easy to exploit and widespread (API1:2023).

How to test: create two accounts in different tenants. Capture a request as User A, then replay it with User B's token.

GET /api/v2/orgs/41/invoices/90311 HTTP/1.1
Host: staging.example.com
Authorization: Bearer <user_B_token>

A 200 returning tenant 41's invoice is a finding. Test every HTTP method, and look for IDs in headers and bodies, not just the path.

Fix: enforce ownership in every data-access function, using a policy layer rather than ad hoc checks. OWASP notes that just comparing the session user ID with an ID parameter "could address only a small subset of cases."

API2:2023 Broken Authentication

What it is: flaws that let an attacker take over tokens or assume another identity (OWASP list).

How to test:

  • Send a JWT with its signature stripped, or "alg":"none", and see if it's accepted.
  • Send an expired token, and a token issued to a deleted user.
  • Hit POST /api/auth/login or /verify-otp 100 times for one account and watch for lockout or throttling.
  • Check whether password change invalidates existing refresh tokens.

Fix: use a maintained auth library, pin allowed algorithms server-side, validate exp/aud/iss, and rate-limit credential and OTP endpoints per account.

API3:2023 Broken Object Property Level Authorization

What it is: authorization is missing at the field level, in either direction. The API returns sensitive properties (formerly "Excessive Data Exposure") or lets clients write properties they shouldn't (formerly "Mass Assignment") (API3:2023).

How to test: read every response body as if you were an attacker. Then take any field you see and send it back:

PATCH /api/users/me HTTP/1.1
Content-Type: application/json
Authorization: Bearer <user_A_token>

{"name":"A","plan":"enterprise","email_verified":true}

Re-fetch the object. If plan changed, you have a finding. OWASP's own example has a user flipping an internal blocked property from true to false.

Fix: explicit allowlists for both input binding and output serialization. Avoid to_json()-style dumps of whole models.

API4:2023 Unrestricted Resource Consumption

What it is: no limits on CPU, memory, records per page, upload size, batched operations or paid third-party calls. OWASP's scenario is a "forgot password" flow that sends SMS at $0.05 per call, scripted tens of thousands of times (API4:2023).

How to test (staging only): request ?limit=100000, upload a file far over the expected size, and send a GraphQL query with dozens of aliased operations. Measure response time and size. For paid flows, check for per-user and per-recipient caps.

Fix: maximum page sizes, payload limits, timeouts, per-operation rate limits, and spending limits or billing alerts on every third-party provider.

API5:2023 Broken Function Level Authorization (BFLA)

What it is: a regular user can call functions meant for another role. BOLA is about which object; BFLA is about which action.

How to test: log in as an admin, capture every admin request, then replay each with a basic user's token. Also guess: if /api/users/{id} exists, try /api/admin/users/{id} and swap GET for DELETE.

Fix: deny by default, and enforce role checks centrally (middleware or route decorators), not inside individual handlers where they get forgotten.

API6:2023 Unrestricted Access to Sensitive Business Flows

What it is: a business flow (buying a ticket, posting a comment, creating a referral) is exposed without considering what happens when it's automated at scale. OWASP notes this "doesn't necessarily come from implementation bugs" (list).

How to test: pick the flows tied to money, inventory or reputation. Script the API calls directly, skipping the UI, and see whether anything (device fingerprinting, CAPTCHA, per-account velocity checks) slows you down. This needs business context, so it is largely a manual test.

Fix: identify which flows matter, then add velocity limits, bot detection and human-verification steps where abuse would hurt.

API7:2023 Server Side Request Forgery

What it is: the API fetches a URL the user supplies without validating it, so an attacker can make the server reach internal services (list).

How to test: find every parameter that takes a URL: webhooks, "import from URL", avatar fetchers, PDF/screenshot renderers. Point it at a request catcher you control to confirm outbound fetches, then check whether internal targets such as 127.0.0.1, private ranges or the cloud metadata address are blocked, including through redirects. In a scoped test, confirm reachability only; don't pull credentials.

Fix: allowlist destination hosts and schemes, resolve and check IPs after DNS resolution, disable redirects, and use IMDSv2 on AWS. Our AWS security misconfigurations checklist covers the metadata side.

API8:2023 Security Misconfiguration

What it is: insecure defaults and missing hardening across the API stack.

How to test:

# Does the API reflect arbitrary origins with credentials?
curl -s -I https://staging.example.com/api/me \
  -H "Origin: https://evil.example" | grep -i "access-control"

Access-Control-Allow-Origin: https://evil.example together with Access-Control-Allow-Credentials: true is a finding. Also trigger errors (malformed JSON, wrong types) and look for stack traces, and check TLS configuration. The free SSL Integrity scanner checks certificate chains, ciphers and protocols.

Fix: strict CORS allowlists, generic error responses, hardened TLS, and debug modes disabled in production.

API9:2023 Improper Inventory Management

What it is: you don't know which API hosts and versions are running. OWASP's example: a beta API host served the same password-reset endpoint as production but without the rate limiting, so a 6-digit reset token could be brute-forced (API9:2023).

How to test: enumerate subdomains and versions (/v1, /v2, /beta), look for exposed OpenAPI files, and compare what responds against your documented inventory. The API Endpoint Discovery scanner enumerates REST and GraphQL endpoints and hidden routes, and Archival Intelligence surfaces historical endpoints. Our full method is in How to Find Shadow and Undocumented APIs Before Attackers Do.

Fix: maintain an inventory with environment, audience and version for each host; generate docs in CI; retire old versions on a schedule; never point non-production APIs at production data.

API10:2023 Unsafe Consumption of APIs

What it is: your API trusts data from third-party APIs more than user input. OWASP's examples include storing an SQL injection payload in a third-party service that the target later pulls in, and an API that blindly follows a 308 redirect, resending sensitive data to an attacker's server (API10:2023).

How to test: this is mostly code and design review. List every external API you consume, then check: is the response validated before use? Are redirects followed? Are there timeouts and size limits? Is TLS enforced?

Fix: validate and sanitize third-party data like user input, allowlist redirect targets, and set timeouts and response size caps.

Which items can be tested automatically?

Automated scanning reliably covers API8 and much of API9, plus parts of API2 and API4. API1, API3, API5 and API6 depend on multiple authenticated roles and an understanding of what the app should allow, which is why they show up most often in manual and authenticated testing. The API Security Testing guide shows how to structure that work, and Authenticated vs Unauthenticated Penetration Testing explains why the role-based tests need credentials. If your API is GraphQL, see GraphQL Security Testing for API1 and API4 in a GraphQL context.

SecurityInfinity's Pro plan includes compliance mapping to SOC 2, ISO and OWASP across all agents (pricing). For an engagement that covers the authorization-heavy items, the Authenticated Startup Pentest includes testing across every user role, access-control, IDOR, business-logic, API and privilege-escalation testing, plus a signed attestation letter. You can also start a free scan on a verified domain to see the configuration and exposure issues first.

Frequently asked questions

What is the latest version of the OWASP API Security Top 10?

The latest edition is the OWASP API Security Top 10 2023, which replaced the 2019 list. It runs from API1:2023 Broken Object Level Authorization to API10:2023 Unsafe Consumption of APIs.

What is the difference between BOLA and BFLA?

BOLA (API1) means a user can access an object that belongs to someone else by changing its ID, on an endpoint they're allowed to use. BFLA (API5) means a user can call a function they shouldn't have access to at all, such as an admin endpoint. OWASP draws this line explicitly in the API1:2023 entry.

Is injection still in the OWASP API Security Top 10?

Not as a standalone category. Injection was API8 in the 2019 edition but doesn't have its own entry in 2023. Injection risks still appear inside other items, for example API10 describes SQL injection through data pulled from a third-party API, and you should still test for it.

How is the OWASP API Security Top 10 different from the OWASP Top 10?

The OWASP Top 10 covers web application risks broadly, while the API Security Top 10 focuses on risks specific to APIs. The API list puts much more weight on authorization at the object, property and function level, plus API-specific issues like inventory management and unsafe consumption of third-party APIs.

Does SOC 2 require testing against the OWASP API Security Top 10?

SOC 2 doesn't name OWASP lists as a requirement, but auditors and enterprise customers commonly accept OWASP-mapped pentest reports as evidence that your application was tested against recognized risks. See SOC 2 Penetration Test: What Auditors Expect for details.

Find what attackers can see, before they do.

AI pentesting agents test your web app, API and cloud, and every finding comes with evidence and a fix. First report in about 10 minutes.

Stay ahead of attackers.

New vulnerabilities, breach write-ups and practical fixes. A few emails a month.