Security 17 min read

API Security in Practice: The OWASP API Security Top 10 in Real Enterprise Systems

By Jamani Speshpro Engineering Team · Published

owasp api security top 10

The API breaches that make headlines rarely involve clever exploits. They involve valid requests, sent by someone who shouldn't be sending them, that nobody was watching. Here is how each of the ten OWASP API risks shows up in real enterprise systems, how to fix it, and how to prove it stays fixed.

A glowing API gateway at the centre of a dark navy network, with teal request streams passing through it and one orange stream slipping past a broken lock

Every modern enterprise runs on APIs. The mobile app, the partner portal, the payment callback, the integration with your ERP, the internal microservices: each is a set of endpoints that hand out data to anyone who sends the right-looking request. That is exactly what makes them a target.

Look at the large API breaches of the last few years and a pattern appears. In most of them, the attacker didn't break encryption or find a memory-corruption bug. They asked the API for data, and the API said yes, millions of times, because nothing checked whether this caller should see that record, or how fast they were asking.

The OWASP API Security Top 10 is the standard list of these failure modes. The current edition is the 2023 list, which replaced the original 2019 version. Most explanations of it stop at definitions. This guide goes further: for each risk, we show where it hides in a typical enterprise stack, how to fix it, and how to prove it stays fixed.

In this guide:

  • Why API breaches look different from web-app breaches

  • All ten OWASP API risks, with the enterprise version of each

  • One table mapping every risk to its fix and its test

  • What Indian enterprises should connect this to under the DPDP Act

  • A 30-day plan to get from "we have a gateway" to measurable API security

Why API breaches look different

Traditional web security focuses on malicious input: SQL injection, cross-site scripting, malformed payloads. A web application firewall is good at spotting those. API attacks are usually different. The requests are well-formed, authenticated (or the endpoint never asked), and look exactly like normal traffic. The attack is in which object is requested, how many times, and by whom.

Three public cases show the pattern:

  • Optus, 2022. Australia's communications regulator, ACMA, alleges in Federal Court filings that a coding error in the access controls of a dormant, internet-facing API let an attacker pull customer records over three days in September 2022. According to ACMA, Optus had fixed the same error on its main domain in 2021, but not on the forgotten API domain. Australia's privacy regulator puts the number of affected people at about 9.5 million.

  • T-Mobile, 2023. In a January 2023 SEC filing, T-Mobile said an attacker abused a single API to obtain data on roughly 37 million customer accounts, including names, billing addresses, emails, phone numbers and dates of birth. The abuse began around 25 November 2022 and was detected on 5 January 2023: about six weeks of a valid-looking API serving data to the wrong person.

  • Dell, 2024. The attacker told TechCrunch and BleepingComputer that he registered fake reseller accounts on a Dell partner portal, had them approved, then cycled through customer service tags at about 5,000 requests a minute for roughly three weeks, collecting some 49 million records. No rate limit, and no check that a given partner should see a given customer.

None of these needed a zero-day. They needed an ownership check, an inventory and a rate limit. That is good news: it means most API risk is an engineering-discipline problem you can fix.

The OWASP API Security Top 10, in enterprise terms

The ten OWASP API Security risks grouped by where they are fixed: authorisation and business flows inside services, authentication and limits at the gateway, configuration and inventory in the platform, and SSRF and unsafe consumption at integrations

The ten OWASP API Security risks grouped by where they are fixed: inside services, at the gateway, in the platform and at integrations

API1:2023 — Broken Object Level Authorization (BOLA)

What it is: the API checks that you are logged in, but not that the object you asked for belongs to you. Change /api/orders/10452 to /api/orders/10453 and you get someone else's order.

Where it shows up in enterprise systems: partner and dealer portals (one partner can see another partner's customers, as in the Dell case), multi-tenant SaaS where the tenant ID comes from the request instead of the token, and "internal" APIs that were exposed to a mobile app later. OWASP ranks it first for a reason: it is easy to introduce and invisible to most scanners.

The fix: never trust an object ID from the client on its own. Scope every data lookup by the caller's identity, in the query itself:

typescript

// Vulnerable: any logged-in user can read any order
const order = await db.order.findUnique({ where: { id: req.params.id } });

// Fixed: the lookup is scoped to the caller's tenant and account
const order = await db.order.findFirst({
  where: { id: req.params.id, tenantId: req.auth.tenantId, accountId: req.auth.accountId },
});
if (!order) return res.status(404).end(); // 404, not 403: don't confirm the ID exists

Random, non-sequential IDs (UUIDs) make enumeration harder, but they are not an access control. The Dell service tags were short and guessable, which made enumeration fast. Random IDs would have slowed the attacker down; only an authorisation check would have stopped him.

How to test it: create two users (ideally in two tenants) in your test environment. For every endpoint that takes an ID, run the request as user A against user B's object and assert a 404. Put this in CI so new endpoints are covered automatically.

API2:2023 — Broken Authentication

What it is: weaknesses in how the API identifies callers: login endpoints without brute-force protection, tokens that never expire, signatures that aren't verified, API keys in URLs and logs.

Where it shows up: mobile back ends that accept JWTs without checking the signature algorithm or audience, password-reset and OTP endpoints with no attempt limits, and long-lived static API keys shared between partners and copied into spreadsheets.

The fix: use a standard identity provider (OAuth 2.0 / OpenID Connect) instead of home-made token logic. Verify signature, issuer, audience and expiry on every token. Keep access tokens short-lived and rotate refresh tokens. Rate-limit login, OTP and reset endpoints per account and per source. Our zero-trust guide covers the identity architecture side.

How to test it: automated checks for expired, unsigned and wrong-audience tokens being rejected; a credential-stuffing simulation against staging to confirm lockout and alerting work.

API3:2023 — Broken Object Property Level Authorization

What it is: the caller may see the object, but not every field in it, or may update it, but not every field. OWASP merged two 2019 risks here: excessive data exposure (the API returns the full record and relies on the app to hide fields) and mass assignment (the API saves whatever fields the client sends).

Where it shows up: user-profile APIs that return password hashes, internal flags or KYC fields "because the mobile app ignores them"; PATCH /users/me endpoints that happily accept "role": "admin" or "creditLimit": 500000.

The fix: define explicit response schemas per role, and serialise only allow-listed fields. On writes, bind only allow-listed properties; never pass the request body straight to the ORM. An OpenAPI contract with additionalProperties: false helps enforce both.

How to test it: contract tests that fail if a response contains fields outside the schema; write tests that send forbidden fields and assert they are ignored or rejected.

API4:2023 — Unrestricted Resource Consumption

What it is: no limits on how much one caller can consume: request rate, page size, upload size, query complexity, or calls to paid services behind the API.

Where it shows up: list endpoints that accept ?limit=1000000, GraphQL APIs without depth or cost limits, file-upload endpoints without size caps, and OTP and SMS endpoints, which many Indian apps rely on for login, that an attacker can trigger thousands of times, running up the SMS bill and flooding real users' phones.

The fix: rate limits per identity, per IP and per endpoint at the gateway; hard maximums on page size, payload size and timeouts in the service; query-cost limits for GraphQL; spending caps and alerts on third-party services such as SMS, email and LLM providers. Our fault-tolerant microservices post covers the resilience patterns that sit alongside these limits.

How to test it: load tests that deliberately exceed each limit and assert a 429 response; a monthly review of top consumers by identity.

API5:2023 — Broken Function Level Authorization (BFLA)

What it is: a normal user can call an admin or privileged function, not just someone else's object. Typically, the UI hides the button, but the endpoint behind it doesn't check the role.

Where it shows up: /api/admin/* routes protected only by "nobody knows the URL"; endpoints where GET checks permissions but DELETE or PUT on the same path doesn't; partner APIs that share code with internal back-office APIs.

The fix: deny by default. Enforce role or permission checks centrally (middleware or a policy engine), per route and per HTTP method, not in each handler. Keep admin APIs on a separate route prefix or a separate deployment that isn't reachable from the public gateway at all.

How to test it: generate a role-by-endpoint matrix from your OpenAPI spec and run every endpoint as every role in CI. Any unexpected 2xx fails the build.

API6:2023 — Unrestricted Access to Sensitive Business Flows

What it is: the API works exactly as designed, but the business flow can be automated at a scale that hurts you: bulk buying limited stock, farming referral bonuses, scraping a catalogue or price list, or mass-registering accounts.

Where it shows up: e-commerce checkout and coupon flows, partner self-registration (the Dell attacker's first step was getting fake partner accounts approved), quote and pricing APIs that competitors scrape, and loan or insurance quote flows that leak pricing models.

The fix: identify which flows are sensitive with the business, because a scanner can't know. Then add friction proportionate to the risk: stronger verification at onboarding, per-account velocity limits on the flow (not just the endpoint), device and behaviour signals, and human review for unusual patterns.

How to test it: write abuse cases alongside user stories ("as an attacker, I want to buy 500 units in a minute") and test them like features.

API7:2023 — Server-Side Request Forgery (SSRF)

What it is: the API fetches a URL that the caller supplies, and the attacker points it somewhere internal: the cloud metadata service, an admin panel or an internal database.

Where it shows up: webhook configuration, "import from URL", link previews, PDF or image generation from a URL, and integrations that fetch partner files. SSRF against the cloud instance metadata service was the route into the 2019 Capital One breach.

The fix: allow-list destination hosts and schemes; resolve and block private, loopback and link-local address ranges after DNS resolution and on every redirect; run URL-fetching code in an isolated network segment with restricted egress; enforce IMDSv2 on AWS (or the equivalent protections on Azure and GCP).

How to test it: include SSRF payloads (internal IPs, metadata addresses, DNS-rebinding hosts, redirect chains) in your DAST suite for every endpoint that accepts a URL.

API8:2023 — Security Misconfiguration

What it is: the API itself may be fine, but the stack around it isn't: verbose error messages with stack traces, permissive CORS, missing security headers, debug endpoints left on, unpatched gateways, default credentials on admin consoles.

Where it shows up: almost everywhere, especially in environments that were set up quickly and never hardened. Staging environments with production data and debug mode on are a recurring finding.

The fix: treat configuration as code. Build hardened gateway and service baselines in Terraform or Helm, scan them with policy-as-code in the pipeline, return generic error messages to clients and keep detail in logs. Our CI/CD pipeline guide shows where these checks sit.

How to test it: infrastructure-as-code scanning on every pull request, plus regular external configuration scans of every public hostname.

API9:2023 — Improper Inventory Management

What it is: you can't secure APIs you don't know about. Old versions, test hosts, partner-specific endpoints and "temporary" integrations stay live long after everyone has forgotten them.

Where it shows up: this is the Optus lesson. According to ACMA's filings, the vulnerable API was dormant, sat on a separate domain, and missed a fix that had been applied elsewhere. In most enterprise estates you will find v1 still running next to v3, staging APIs on public DNS, and endpoints that appear in gateway logs but in no documentation.

The fix: build an inventory from traffic and infrastructure, not from documentation: gateway logs, load balancer and DNS records, cloud API gateway listings, and service-mesh telemetry. Compare it with your OpenAPI specs. Give every API an owner, a data classification and a retirement date, and decommission old versions properly.

How to test it: a monthly automated diff between "what is receiving traffic" and "what is documented and owned". Anything in the first list but not the second is a finding.

API10:2023 — Unsafe Consumption of APIs

What it is: your system trusts data from other APIs, such as partners, payment gateways, SaaS tools and data providers, more than it trusts user input. Attackers target the weaker third party to reach you.

Where it shows up: payment and logistics webhooks processed without verifying the signature, redirects from partner APIs followed blindly, partner data written to the database without validation, and AI agents acting on the output of tools and APIs they called. The last one is now common enough that we cover it separately in building secure AI agents.

The fix: validate and sanitise third-party responses against a schema, exactly as you would user input. Verify webhook signatures and timestamps; reject replays. Use TLS for every integration, set timeouts and response-size limits, and don't follow redirects by default.

How to test it: contract tests with malformed and malicious partner responses; replayed and unsigned webhook tests in staging.

Every risk on one page: fix, location and test

Every risk on one page: fix, location and test

Notice the "where" column. An API gateway or WAF helps with API2, API4 and parts of API8, but the most damaging risks, API1, API3 and API5, can only be fixed inside your services, because only the service knows who owns which record. A gateway cannot know that order 10453 belongs to someone else. Teams that buy a gateway and consider API security "done" are protected against the wrong half of the list.

What this means for Indian enterprises

If your APIs process personal data of people in India, the DPDP Act and DPDP Rules 2025 make this a compliance question as well as an engineering one. The Act requires "reasonable security safeguards" to prevent personal data breaches, and the penalty for failing to take them can reach ₹250 crore. A BOLA flaw that exposes customer records is exactly the kind of breach those safeguards exist to prevent, and if the Data Protection Board inquires, you will need to show what controls you had in place.

Two practical consequences:

  • Evidence matters. CI authorisation tests, an API inventory with owners, and per-identity access logs are the artefacts that demonstrate "reasonable safeguards". Keep them.

  • Detection time matters. The T-Mobile abuse ran for about six weeks before anyone noticed. Per-identity monitoring (how many distinct customer records did this partner account read today?) is what shortens that window, and it is what lets you meet your incident-reporting obligations with facts rather than guesses.

A 30-day plan to get started

You don't need a big programme to remove most of your API risk. This is the sequence we recommend at the start of an API security engagement.

  1. Week 1 — Build the real inventory. Pull every hostname and route that received traffic in the last 30 days from gateway, load-balancer and DNS data. Match each to an owner and an OpenAPI spec. Anything unowned is either documented or switched off. (API9)

  2. Week 2 — Test authorisation on the top 20 endpoints. Pick the endpoints that return personal or financial data. Write two-user, two-role tests for each and add them to CI. Fix what fails; expect findings. (API1, API3, API5)

  3. Week 3 — Put limits everywhere. Rate limits per identity at the gateway; maximum page and payload sizes in services; attempt limits on login, OTP and reset; spend alerts on SMS and other paid providers. (API2, API4)

  4. Week 4 — Watch per identity, and check your integrations. Alert on unusual record counts per caller; verify every inbound webhook signature; add SSRF protection to any endpoint that fetches a URL. (API6, API7, API10)

After that, make it routine: authorisation tests are part of the definition of done for every new endpoint, the inventory diff runs monthly, and an independent penetration test with an API focus runs at least yearly and after major releases.

A four-week API security plan: week 1 inventory, week 2 authorisation tests in CI, week 3 rate and resource limits, week 4 per-identity monitoring and integration checks

A four-week API security plan: inventory, authorisation tests in CI, rate and resource limits, per-identity monitoring

FAQ

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

The current edition is the OWASP API Security Top 10 2023, which replaced the first edition from 2019. It added risks such as unrestricted access to sensitive business flows, server-side request forgery and unsafe consumption of APIs, and merged excessive data exposure and mass assignment into broken object property level authorization.

What is the most common API vulnerability?

Broken object level authorization (BOLA), ranked API1 by OWASP. It happens when an API checks that a caller is logged in but not that the requested record belongs to them. It is common because it can only be fixed in each service's data-access logic, not by a gateway or firewall.

Is an API gateway or WAF enough for API security?

No. Gateways and WAFs handle authentication enforcement, rate limiting and some misconfiguration well. They cannot fix object-level, property-level or function-level authorisation, because those depend on business data that only your services have. You need both, plus authorisation tests in CI.

How do you test APIs against the OWASP API Top 10?

Combine three things: automated authorisation tests in CI using at least two users and two roles, dynamic scanning (DAST) for injection, SSRF and misconfiguration, and a periodic manual penetration test focused on business logic and abuse of business flows, which automated tools miss.

Does the DPDP Act require API security testing?

The DPDP Act doesn't name specific tests, but it requires reasonable security safeguards to prevent personal data breaches, with penalties of up to ₹250 crore for failing to take them. Documented API authorisation tests, an owned API inventory and access monitoring are strong evidence that your safeguards were reasonable.

The bottom line

API breaches are rarely sophisticated. They happen when an API trusts an ID it shouldn't, has no limit on how fast it can be asked, or was forgotten entirely. The OWASP API Security Top 10 is a good map of these failures, but the map only helps if each risk has an owner, a fix in the right layer and a test that runs on every release.

If you are not sure what your APIs would hand to a determined partner account, talk to our cybersecurity team. We will inventory your APIs, test them against all ten risks and leave you with the CI tests to keep them fixed. Get in touch.

API SecurityOWASPApplication SecurityAccess Control