Managed security · 3 min read

API security testing, explained in plain English.

APIs carry your data between apps, websites and partners, so attackers go straight for them. This guide explains the main API risks, what a proper API security test checks, and what you should receive at the end.

API security testing, explained in plain English.: HanulSec guide
Key points
  • The most common serious API flaw is broken authorisation: one user reaching another user’s data by changing an ID.
  • You cannot test what you cannot see: start with a complete list of your APIs, including old versions and forgotten ones.
  • Scanners find missing settings and known flaws, but access control and business logic need human testers.
  • The OWASP API Security Top 10 is the standard reference for the most common API risks.
  • Test with accounts for every role, and retest after you fix.

Why APIs need their own testing

An API is the door that apps, websites and partners use to reach your data. A web page shows a user only what the interface allows, but an API will answer anyone who sends it a valid request, so every rule has to be enforced on the server. Attackers know this, and they send requests directly, skipping the screen entirely. A test that only clicks through the app will miss most API problems.

The main API risks

The OWASP API Security Top 10 lists the most common ones. In plain terms:

RiskWhat it means
Broken object-level authorisationChanging an ID in a request returns another customer’s record
Broken authenticationWeak logins, tokens that never expire, or tokens that can be guessed or forged
Broken property-level authorisationThe API returns or accepts fields the user should not see or change, such as “isAdmin”
Unrestricted resource consumptionNo limits on requests or sizes, so one user can overload the service or run up costs
Broken function-level authorisationA normal user can call admin functions
Unrestricted access to sensitive business flowsAutomated abuse of sign-up, booking, voucher or purchase flows
Server-side request forgeryAn endpoint that fetches a URL can be pointed at internal systems
Security misconfigurationVerbose errors, open cross-origin settings, missing TLS, default settings
Improper inventory managementOld, test or undocumented API versions left running
Unsafe consumption of APIsTrusting data from third-party APIs without checking it

What a good API test covers

  • Discovery: build a full list of endpoints from documentation, traffic and the app itself, then look for ones nobody listed.
  • Authentication: how users and services prove who they are, and how tokens are issued, expire and are revoked.
  • Authorisation on every endpoint: using accounts for each role, check that users can reach only their own data and only the functions their role allows.
  • Input handling: injection, unexpected data types, very large inputs and mass assignment, where extra fields in a request change things they should not.
  • Limits and abuse: rate limiting, size limits and protection of sensitive flows such as login, password reset and payments.
  • Data exposure: whether responses include more data than the client needs.
  • Configuration: TLS, cross-origin settings, error messages and old versions still reachable.

Tools and human testers

Automated tools are useful for finding endpoints, spotting missing settings and fuzzing inputs. They struggle with the worst API flaws, because those depend on who should be allowed to see what, and on how your business works. A scanner does not know that customer A must never see customer B’s invoice. That check needs a person with two test accounts. Our guide to vulnerability assessment vs penetration testing explains the difference.

How to prepare

  • Share the API definition (for example an OpenAPI or Postman file) if you have one, but also tell testers about anything not in it.
  • Provide accounts for every role, ideally two of each, plus any API keys or service credentials in scope.
  • Choose the environment: a staging copy that matches production is safest, but it must be realistic.
  • Agree scope and contacts in writing, including rate limits testers should respect.

What you should receive

  • An executive summary leaders can read in a few minutes.
  • Each finding with proof: the request, the response, and the impact in plain terms.
  • A severity rating and a specific fix for each finding.
  • A retest confirming each issue is closed.

After the test

Fix authorisation issues first, because they expose data directly. Then add checks to your build process so the same flaw is caught earlier next time, and keep your API inventory current. If your API sits behind a web app, see our web application penetration testing checklist, and for timing see how often to run a penetration test. To arrange a test, see our penetration testing service.

Questions

Questions buyers ask before they call us.

What is the most common API vulnerability?
Broken authorisation, where a user can reach another user’s data by changing an identifier. It tops the OWASP API Security Top 10 and is rarely found by automated scanners.
Do we need to test APIs separately from our web app?
Yes. The web app only shows what its interface allows, while the API answers any valid request. Testing the API directly finds flaws a click-through test misses.
What do testers need from us?
A list or definition of your APIs, test accounts for every role, an agreed scope and environment, and contacts on both sides.
Are third-party APIs in scope?
Only the ones you own or have permission to test. Testers can still check how your systems handle data from third-party APIs.
Request a quote

Scope it in two minutes.

Tell us what you need protected. A security engineer, not a salesperson, replies with a fixed-price proposal.

  • Reply within one business day
  • Free 30-minute scoping call
  • Mutual NDA before any detail is shared
  • Fixed price, free retest of fixed findings