API security testing checks the interface your applications use to exchange data, rather than the screens people see. A good test works through the ten risks in the OWASP API Security Top 10 (2023), led by Broken Object Level Authorization, and tests the API directly, not only through the app. If you have a mobile app, you have an API.
Most mobile apps are a well-designed front end on top of an API that nobody outside the development team has ever looked at directly. The app decides what a customer can see. The API decides what a customer can get. They are not always the same thing.
OWASP, the Open Worldwide Application Security Project, puts the scale of it plainly on its API Security project page (opens in a new tab): “APIs are a critical part of modern mobile, SaaS and web applications and can be found in customer-facing, partner-facing and internal applications.” An API (application programming interface) is the set of addresses and rules one piece of software uses to ask another for data. Your app uses it. So can anyone else who finds it.
This post goes through OWASP’s ten API risks in OWASP’s own order, says which ones your app is most likely hiding, and what a tester should do about each. For the wider list that covers web applications, see our guide to the OWASP Top 10 for buyers. For what we test and how, see our API penetration testing page.
The OWASP API Security Top 10 at a Glance
The OWASP API Security Top 10 is a ranked list of the ten most important API risks, and the 2023 edition is the current one. OWASP released the 2023 stable version on 5 June 2023 (opens in a new tab).
We’ve kept OWASP’s ranking rather than invent our own. What we’ve added is the column a buyer needs: how likely the risk is to stay invisible if you only ever test through the app.
| # | OWASP 2023 risk | In plain English | Hidden by the app? | What a tester does |
|---|---|---|---|---|
| 1 | API1:2023 Broken Object Level Authorization | Change an ID, get someone else’s record | Almost always | Requests other users’ objects with a valid login |
| 2 | API2:2023 Broken Authentication | Weak tokens, logins or resets let someone pose as another user | Often | Attacks the token and login flow directly |
| 3 | API3:2023 Broken Object Property Level Authorization | The API returns, or accepts, fields the user shouldn’t touch | Almost always | Reads full responses; sends extra fields |
| 4 | API4:2023 Unrestricted Resource Consumption | No sensible limits, so requests cost you money or availability | Often | Tests rate limits and paid-for integrations, within agreed bounds |
| 5 | API5:2023 Broken Function Level Authorization | Ordinary users can call admin functions | Often | Calls admin endpoints with a normal account |
| 6 | API6:2023 Unrestricted Access to Sensitive Business Flows | A legitimate feature abused at machine speed | Sometimes | Automates a business flow to see what stops it |
| 7 | API7:2023 Server Side Request Forgery | The API fetches a URL the user supplies | Sometimes | Points URL inputs at internal destinations |
| 8 | API8:2023 Security Misconfiguration | Defaults, verbose errors, missing headers | Rarely | Checks configuration across every host and version |
| 9 | API9:2023 Improper Inventory Management | Old, test or undocumented endpoints still live | Almost always | Compares what’s documented with what answers |
| 10 | API10:2023 Unsafe Consumption of APIs | Your API trusts data from someone else’s API | Almost always | Reviews how third-party data is validated, where in scope |
Risk names are exactly as OWASP publishes them (opens in a new tab), with American spelling. The rest is ours.
Broken Authentication
Broken Authentication means an attacker can pose as another user, temporarily or permanently, because tokens, logins or password resets are built badly. OWASP’s wording is that compromising a system’s ability to identify the user compromises API security overall.
Mobile apps make this harder to see, because the login screen looks the same whether the token behind it is strong or weak. The tester should work on the tokens themselves: how they’re issued, how long they last, and whether they can be reused or forged.
The UK government’s own API technical and data standards (opens in a new tab) (last updated 19 July 2024) recommend the OAuth 2.0 Authorization Framework for managing access. That’s a sensible benchmark to ask about, not a requirement for your organisation.
Unrestricted Resource Consumption
Unrestricted Resource Consumption is an API with no sensible limits, so a determined caller can run up your costs or knock the service over. OWASP notes that some of those costs are real money: emails, text messages, phone calls and biometric checks are often provided by third parties and paid for per request.
This is the one to scope carefully. You want to know whether limits exist, not to discover your SMS bill the hard way. Agree in advance how far the tester may go, and against which environment.
Unrestricted Access to Sensitive Business Flows
This risk is a legitimate feature, used exactly as designed, but at a volume or speed that harms the business. OWASP’s examples are buying a ticket or posting a comment, and it adds: “This doesn’t necessarily come from implementation bugs.”
That makes it the risk a scanner can’t find. There’s no broken code to spot, only a question about what should stop one account buying every ticket in the first minute. It needs someone who understands the business flow, which is why the scoping call matters more here than anywhere else.
Server-Side Request Forgery
Server-Side Request Forgery (SSRF) happens when the API fetches a web address the user supplies without checking it. OWASP says it can let an attacker send a crafted request to an unexpected destination, even one protected by a firewall or a VPN.
Features that import a profile picture from a link, or preview a web page, are the usual places. The tester points them at internal addresses and watches what comes back.
Security Misconfiguration
Security Misconfiguration is defaults left on, error messages that say too much, and settings that differ between one server and the next. It’s also the risk most visible from the outside, so it’s the one automated tools find best.
That’s the useful point for a buyer. If most findings in an API test report sit here, you may have bought a scan. Our post on the difference between a vulnerability scan and a penetration test covers why that matters.
Improper Inventory Management
Improper Inventory Management is not knowing which APIs, versions and hosts you actually have live. OWASP puts it directly: “APIs tend to expose more endpoints than traditional web applications, making proper and updated documentation highly important.”
Every app release that changes the API tends to leave the old version running for the customers who haven’t updated. Those versions don’t get the fixes. They do still answer.
What to ask for: the tester should compare what your documentation says exists with what actually responds, including old versions and test hosts.
Unsafe Consumption of APIs
Unsafe Consumption of APIs is your API trusting data from a third party’s API more than it would trust a user. OWASP observes that “Developers tend to trust data received from third-party APIs more than user input, and so tend to adopt weaker security standards.”
Payment providers, address lookups, identity checks: each one is an input you didn’t write. Whether a tester can reach this depends on scope and on the third party’s own terms, so raise it at scoping rather than assume it’s covered.
What to Get Ready Before an API Security Test
An API security test goes further, faster, when the tester starts with the documentation and the accounts rather than reverse-engineering the app.
| Bring this | Why it matters |
|---|---|
| The API specification or documentation, including old versions still live | Risk 9: the tester can’t test what nobody mentions |
| At least two accounts at each role, including an admin account | Risks 1, 3 and 5 need accounts to compare |
| A test environment, or agreed limits in live | Risk 4: testing limits without a surprise bill |
| A list of third-party APIs yours depends on | Risk 10, and the permission question |
| Written confirmation the API itself is in scope, not just the app | The whole point of this post |
On the environment, the GDS standards make a point worth borrowing: “API test services should still be secure and require all users to be authenticated before granting access.” A test environment with no login is a second target, not a safe copy.
For the general preparation, see our guide to how to prepare for a penetration test. If the app itself is also in scope, we’ve written separately about preparing for a mobile app penetration test.
API Security Testing FAQs
What Is API Security Testing?
API security testing checks an application programming interface for flaws an attacker could use, such as reading other users’ data or calling admin functions. It tests the API directly, usually against the OWASP API Security Top 10, rather than only through the app that uses it.
How Is API Security Testing Different From Web Application Testing?
A web application test mostly works through pages a person sees. An API test works on the requests underneath, so it finds access control and data exposure flaws the interface hides. Most modern web and mobile applications need both, because both sit on an API.
What Is the Latest OWASP API Security Top 10?
The latest edition is the OWASP API Security Top 10 2023, released as a stable version on 5 June 2023. It is led by Broken Object Level Authorization. The earlier edition was 2019; OWASP combined two 2019 risks into the 2023 list’s third entry.
Does the NCSC Say to Test APIs?
The National Cyber Security Centre’s guidance on building and operating a secure online service (opens in a new tab) (published 2 March 2022) points to the OWASP API Security Top 10 for “a detailed overview of the common threats”, and describes penetration testing as “a commonly used method to help gain confidence in your system’s technical implementation.”
Test the API Behind Your App, Not Just the App
Before your next test, check one thing in writing: that the API is in scope as an API, with documentation and accounts supplied, and not just as whatever the app happens to call. If the proposal only mentions the app, ask why.
I’ve still not managed to get the television app on my phone to pair with the television, so I’m in no position to lecture anyone about mobile apps. But the pattern in API findings is consistent enough to say plainly: the app is rarely where the problem is.
If you’d like us to look at an API test scope, or last year’s report, and tell you which of the ten risks it actually covered, do get in touch.
The app is what your customers see. The API is what everyone else sees.