Top API Security Risks

The OWASP API Security Top 10 for 2023, API1 to API10, explained in plain language with a short fix for each risk, from BOLA to unsafe API consumption.

What are the top API security risks?

The top API security risks are the weaknesses attackers most often exploit to read other people's data, take over accounts or take a service down. The reference list is the OWASP API Security Top 10, last published for 2023. It names ten categories, mostly about missing server-side checks: who may see which object, which field, which function, and how much they may consume. Each risk below has a short explanation and the usual fix.

The OWASP API Security Top 10 (2023)

API1:2023 Broken Object Level Authorization

The API takes an object ID from the client (for example /orders/1043) and returns the record without checking that the caller may see it. Fix: check ownership on every object access, server side, and use unpredictable IDs as an extra layer, not a replacement.

API2:2023 Broken Authentication

Login, token or key handling is weak: no rate limit on login, tokens that never expire, secrets in URLs, or unsigned tokens accepted. Fix: short-lived tokens, strong verification of signatures and expiry, limits on credential attempts.

API3:2023 Broken Object Property Level Authorization

The caller may see or change an object but not every field in it: responses expose too much (excessive data exposure) or the API lets clients write fields such as role or price (mass assignment). Fix: return and accept explicit field allowlists.

API4:2023 Unrestricted Resource Consumption

Requests consume CPU, memory, bandwidth or paid third-party calls with no cap, so one client can degrade the service or run up the bill. Fix: rate limits, payload and page-size caps, timeouts, and quotas per client. This is also the risk a load test exposes.

API5:2023 Broken Function Level Authorization

Regular users can call administrative or other privileged functions, for example by changing GET to DELETE or guessing an /admin path. Fix: deny by default and check the caller's role on every function, not only in the UI.

API6:2023 Unrestricted Access to Sensitive Business Flows

A legitimate flow, such as buying limited stock, posting comments or redeeming a coupon, can be automated at a scale that harms the business. Fix: detect automation, add friction on sensitive flows, and limit by device, account and business rule. See API abuse.

API7:2023 Server Side Request Forgery

The API fetches a URL supplied by the client, so an attacker can make the server call internal services or cloud metadata endpoints. Fix: allowlist destinations, block private address ranges, and never return raw fetched responses.

API8:2023 Security Misconfiguration

Defaults and drift: verbose error messages, missing TLS, permissive CORS, unneeded HTTP methods, unpatched components. Fix: a hardened, repeatable baseline, reviewed in code, and a check that production matches it.

API9:2023 Improper Inventory Management

Old versions, test hosts and undocumented endpoints stay reachable and unpatched. Fix: keep a live inventory of hosts, versions and owners, and retire what nobody owns. See API sprawl.

API10:2023 Unsafe Consumption of APIs

Your service trusts data from third-party APIs more than from users, so a compromised or buggy partner can inject bad data or redirect traffic. Fix: validate and limit what third-party responses can do, enforce TLS and timeouts, and treat them as untrusted input.

How to use the list

Start with API1, API2 and API5: authorization and authentication flaws cause the most damaging leaks, and a scanner struggles with them because each request looks valid. Test them with two accounts: log in as user A and request user B's objects, then repeat with no token. Then map the rest to your stack. The wider discipline is covered in API security, and the techniques attackers use in API attacks.

Common mistakes

  • Checking authorization in the UI only. The API is called directly, so every check must live on the server.
  • Treating the list as a checklist to tick once. New endpoints and versions bring the same risks back.
  • Trusting identifiers as secrets. A hard-to-guess ID is not authorization.
  • Leaking credentials. Tokens in URLs and logs end up in the wrong hands. See bearer tokens.
  • Ignoring limits. No rate limit, page-size cap or timeout means API4 is open.

Where monitoring and testing help

LoadFocus is not a vulnerability scanner and does not find injection flaws or authorization bugs. It can still support a few of these controls. API monitoring sends scheduled HTTP checks and verifies the status code, headers and response body, so you can alert if an endpoint that should answer 401 or 403 without a token starts returning 200, or if an old version you retired comes back. Load testing shows how an endpoint behaves under many concurrent requests, which tells you whether the limits behind API4 actually hold. For tool options, read our overview of API monitoring tools. Use a dedicated security tester for penetration tests and vulnerability scans.

FAQ

What is the number one API security risk?

In the OWASP API Security Top 10 for 2023, the first entry is Broken Object Level Authorization (BOLA). It happens when an API returns an object by ID without checking that the caller is allowed to access it.

How is the API Top 10 different from the web application Top 10?

The web application list covers browser-facing issues such as injection and cross-site scripting. The API list focuses on how APIs expose objects, properties and business flows directly, so authorization and resource limits rank much higher.

How often is the OWASP API Security Top 10 updated?

The current edition is from 2023. The earlier edition dates from 2019, so check the OWASP site for the latest version before building a review around it.

Can a load test find API security problems?

Not directly. A load test shows how an API behaves under heavy traffic, which helps you confirm rate limits and resource caps. It does not detect authorization or injection flaws, so you still need security testing.

How fast is your website?

Elevate its speed and SEO seamlessly with our Free Speed Test.

Free Website Speed Test

Analyze your website's load speed and improve its performance with our free page speed checker.