API Security Testing: What Professional Pentesters Actually Check

Your API is probably the most attacked surface in your application. APIs handle authentication, expose data, process transactions, and wire services together — all in a format that attackers can inspect and manipulate as easily as developers can.

But most security testing programs treat APIs as an afterthought. Automated scanners built for web applications miss a significant portion of API-specific vulnerabilities. Annual pentests cover the obvious categories but rarely have time to go deep on business logic. Internal security teams often don't have the API-specific attack knowledge that external pentesters bring.

This guide covers what professional pentesters actually test when they're handed an API to assess — and why many of these vulnerabilities survive automated scans.


The OWASP API Security Top 10

The OWASP API Security Top 10 is the standard reference for API-specific vulnerabilities. It's worth understanding this list not as a checklist but as a map of how APIs fail in practice.

API1: Broken Object Level Authorization (BOLA / IDOR)

This is the most common critical API vulnerability. It happens when an API endpoint accepts an object reference — an ID, UUID, or slug — without verifying that the requesting user is authorized to access that specific object.

A vulnerable pattern:

GET /api/accounts/12345/transactions
Authorization: Bearer [token for account 12345]

An attacker simply changes 12345 to 12346 and gets another user's transactions.

Why it survives automated scans: BOLA requires context. The scanner needs to know that account 12345 belongs to user A and 12346 belongs to user B. Static scanners don't know this. Professional pentesters create multiple test accounts and manually verify access patterns.

What pentesters test:

API2: Broken Authentication

Authentication failures specific to APIs differ from web application failures. APIs often implement their own auth mechanisms separate from the main application.

What pentesters test:

API3: Broken Object Property Level Authorization

A subtler form of BOLA: you're authorized to access the object, but you shouldn't see or modify specific properties within it.

Classic example: A user can update their own profile. The PUT /api/users/{id} endpoint accepts a JSON body. A pentester tests whether they can include fields that shouldn't be writable:

{"name": "Alice", "role": "admin", "credits": 9999}

If the API doesn't filter incoming properties against an allowlist, mass assignment vulnerabilities exist.

What pentesters test:

API4: Unrestricted Resource Consumption

APIs often have no limits on how many resources a request can consume.

What pentesters test:

API5: Broken Function Level Authorization

Role-based access control failures where users can invoke administrative or privileged API functions.

What pentesters test:

API6: Unrestricted Access to Sensitive Business Flows

APIs expose business logic directly. This is one of the hardest categories to catch with automation.

Examples:

What pentesters do here: They read the business logic documentation, understand how the API is supposed to work, and then specifically attempt to violate those business rules. There's no scanner that does this.

API7: Server-Side Request Forgery (SSRF)

When an API makes server-side HTTP requests based on user-supplied input, attackers can target internal services.

Common patterns:

What pentesters test:

API8: Security Misconfiguration

API-specific misconfiguration that goes beyond standard web application hardening.

What pentesters check:

API9: Improper Inventory Management

APIs built by multiple teams, accumulated over time, tend to accumulate undocumented and forgotten endpoints.

What pentesters test:

API10: Unsafe Consumption of APIs

Often overlooked: if your application consumes third-party APIs, the security of those upstream APIs affects your application.

What pentesters check:


Authentication Deep-Dives

JWT Testing

JSON Web Tokens are ubiquitous in API authentication. They're also commonly misconfigured.

Common JWT vulnerabilities:

Algorithm confusion: If the server accepts the alg claim from the token itself:

Key exposure: Is the JWT secret weak enough to brute-force? Is it stored in the codebase, environment variables passed to client-side bundles, or API responses?

Claim validation: Does the server verify exp (expiry), nbf (not before), iss (issuer), and aud (audience)?

Token storage: Are JWTs stored in localStorage (XSS-accessible) or httpOnly cookies (preferred)?

OAuth 2.0 Testing

OAuth flows introduce complex attack surfaces at the intersection of redirects, state management, and token exchange.

What pentesters check:


What Automated Scanners Miss

To be direct: automated scanners are good at finding symptoms of known vulnerability patterns. They are poor at:

  1. Business logic vulnerabilities — BOLA, BFLA, API6 (unrestricted business flows) require understanding what the API is supposed to do
  2. Second-order effects — an injection payload stored and executed later, a race condition that only manifests under concurrent load
  3. Authorization logic — scanners don't create test users, don't understand role hierarchies, don't verify that user A can't access user B's data
  4. Chained vulnerabilities — a combination of a low-severity misconfiguration and a medium-severity auth issue that together produce a critical finding
  5. Custom authentication schemes — non-standard token formats, proprietary session management

This isn't an argument against automated scanning — it's an argument for using both. Automated scanning finds the infrastructure-level and common-pattern vulnerabilities at scale and speed. Manual testing by practitioners finds the business-logic and context-dependent issues.


Building a Practical API Security Program

Continuous automated baseline

Run automated API security scanning continuously — against staging, pre-production, or production with appropriate safeguards. This gives you:

Annual or per-major-release manual penetration testing

Manual testing by practitioners who understand the OWASP API Top 10 should cover:

API inventory

Keep an up-to-date inventory of all API endpoints, including internal vs. external exposure, authentication requirements, data sensitivity, and service-to-service vs. client-facing designation. Without an inventory, you can't test what you don't know exists.

Ironimo runs Kali Linux-powered API security scanning as part of its core scan workflow — nuclei with API-specific templates, authentication boundary testing, SSRF detection, misconfiguration checks. It's the continuous automated baseline that ensures you're not shipping obvious API vulnerabilities between your annual pentests.

Start free scan
← Back to Blog