Axum SEC Logo
API Security Testing 101: How to Find Vulnerabilities Before Attackers Do
Back to Blog
API Security

API Security Testing 101: How to Find Vulnerabilities Before Attackers Do

AXUM SEC Team
May 11, 2026
8 min read
API SecurityMay 11, 20268 min read

APIs are the #1 attack target. Learn how to test for BOLA, broken authentication, rate limiting, and injection flaws with actionable techniques and tools. Based on Axum's research across 10,000+ APIs.

APIs are the #1 attack target. Learn how to test for BOLA, broken authentication, rate limiting, and injection flaws with actionable techniques and tools. Based on Axum's research across 10,000+ APIs.

Why API security testing matters

APIs power everything. Your mobile app talks to your backend via API. Your frontend JavaScript fetches data via API. Your partners integrate with you via API.

And attackers know this.

In Axum's 2025 API security research across 10,000+ APIs, we found that 87% of APIs had at least one critical or high-severity vulnerability. The average API had 14 security flaws.

The good news? Most of these vulnerabilities are discoverable — and fixable — before attackers find them.

This guide walks through API security testing: what to test, how to test it, and common mistakes to avoid.


What makes API testing different from web app testing?

Web application testingAPI security testing
Focus on UI and formsFocus on endpoints and data structures
Test for XSS in input fieldsTest for injection in JSON/XML bodies
Check session cookiesCheck JWT tokens, API keys, OAuth
Manual browsingAutomated endpoint fuzzing
CSRF tokens matterRate limiting and BOLA matter more

APIs have no UI to hide behind. Attackers talk directly to your business logic.


The OWASP API Top 10 (your testing checklist)

OWASP maintains a specific top 10 for APIs. Test for these:

#CategoryWhat to check
API1Broken Object Level Authorization (BOLA)Can user A access user B's data by changing an ID?
API2Broken AuthenticationAre tokens weak? Can they be forged?
API3Excessive Data ExposureDoes the API return more fields than needed?
API4Lack of Rate LimitingCan I make 10,000 requests per minute?
API5Broken Function Level AuthorizationCan a standard user call admin endpoints?
API6Mass AssignmentCan I update fields I shouldn't control?
API7Security MisconfigurationAre debug endpoints exposed? CORS wide open?
API8InjectionSQL, NoSQL, command injection in parameters
API9Improper Assets ManagementAre old API versions still live?
API10Unsafe ConsumptionDoes the API blindly trust third-party APIs?

5 essential API testing techniques

1. Endpoint discovery

You can't test what you don't know exists.

How to do it:

  • Crawl the frontend JavaScript for API calls
  • Review OpenAPI/Swagger specs (often left public)
  • Fuzz for common endpoints: /v1/, /v2/api/, /admin/, /internal/
  • Check robots.txt and sitemap.xml

Tools: Burp Suite, Postman, Kiterunner, ffuf

Example command:

ffuf -u https://target.com/FUZZ -w wordlist.txt -c

2. Authentication testing

Weak authentication is the fastest path to a breach.

What to test:

  • Can you register with a duplicate email?
  • Are password reset tokens predictable?
  • Does the JWT use "none" algorithm? (Yes, this happens)
  • Is the JWT secret weak or default?
  • Can you reuse an expired token?
  • Is there MFA? Can it be bypassed?

Tools: jwt_tool, Burp Sequencer, custom scripts

Example JWT attack:

// Original token header
{
  "alg": "HS256",
  "typ": "JWT"
}

// Try changing to "none"
{
  "alg": "none",
  "typ": "JWT"
}
// Remove signature — some APIs will accept it

3. BOLA / IDOR testing

Broken Object Level Authorization is the #1 API vulnerability for a reason — it's everywhere.

What to test:

  • Change user_id in /api/users/123/profile to another number
  • Change invoice_id in /api/invoices/INV-001 to another ID
  • Try UUIDs — are they sequential? Predictable?
  • Test nested resources: /api/orgs/1/users/2 — can you access other orgs?

How to automate:

import requests

for i in range(1, 1000):
    url = f"https://target.com/api/users/{i}/profile"
    response = requests.get(url, headers=headers)
    if response.status_code == 200:
        print(f"Found accessible profile: {i}")

4. Rate limiting testing

No rate limiting means attackers can brute force, scrape, or DoS your API.

What to test:

  • Send 100 requests as fast as possible
  • Send 10,000 requests over 5 minutes
  • Try different IPs (via X-Forwarded-For header)
  • Try different user accounts or API keys

Simple test using curl:

for i in {1..100}; do
  curl -X POST https://target.com/api/login \
    -d '{"email":"test@example.com","password":"guess'.$i.'"}' \
    -H "Content-Type: application/json"
done

What a good API should do:

  • Return 429 Too Many Requests after a threshold
  • Block or CAPTCHA after repeated failures
  • Track rate limits by IP, API key, and user ID

5. Injection testing

APIs accept structured data (JSON, XML, GraphQL) and can be vulnerable just like web forms.

What to test:

  • SQL injection in query parameters and JSON values
  • NoSQL injection in MongoDB/GraphQL APIs
  • Command injection if the API calls system commands
  • XXE in XML-based APIs (SOAP, old REST)

Example NoSQL injection in JSON:

{
  "username": "admin",
  "password": { "$ne": "" }
}

This may bypass authentication by asking for "password not equal to empty string."

Example SQL injection in query param:

GET /api/users?username=admin' OR '1'='1

Tools we recommend

ToolPurpose
Postman / InsomniaManual API testing and exploration
Burp Suite (Professional)Proxy, repeater, intruder for parameter fuzzing
ffuf / gobusterEndpoint discovery and fuzzing
KiterunnerAPI-specific endpoint brute forcing
jwt_toolJWT token testing and forgery
GraphQL Raider (Burp extension)GraphQL introspection and attack testing
ZAP (OWASP)Free automated API scanning

Automated vs. manual testing

AutomatedManual
Finds misconfigurations, missing auth, known CVEsFinds business logic flaws, BOLA, complex chains
Fast, scalableSlow, requires skill
Low false positivesHigh-value findings
Best for CI/CDBest for pre-release penetration testing

Our recommendation: Do both. Automate what you can. Manually test business-critical endpoints.


API testing in CI/CD

Tools like Postman, SoapUI, and ZAP can run in your pipeline:

# GitHub Actions example
- name: Run API security scan
  run: |
    zap-api-scan.py \
      -t https://staging.target.com/openapi.json \
      -f openapi \
      -r report.html

What to check in CI/CD:

  • Authentication bypasses
  • Missing rate limits
  • Exposed sensitive fields
  • SQL/NoSQL injection patterns

Common mistakes (and how to avoid them)

MistakeFix
Only testing documented endpointsDiscover and test shadow APIs
Ignoring GraphQLCheck introspection and depth limiting
Testing as admin onlyTest as every role (user, viewer, unauthenticated)
No negative testingDon't just test happy path — break things
Trusting API specs blindlyWhat's documented vs. what's deployed often differ

API security testing checklist

Pre-flight:

  • Obtain OpenAPI / Swagger spec if available
  • Understand authentication method (JWT, API key, OAuth)
  • Know user roles (admin, user, guest)

Basic tests:

  • Crawl frontend for hidden endpoints
  • Test for missing authentication on all endpoints
  • Test for BOLA across all ID parameters
  • Test rate limiting with 500+ requests

Advanced tests:

  • Test JWT weaknesses (alg none, weak secret, expiration)
  • Test GraphQL introspection and depth attacks
  • Test for mass assignment
  • Test for injection in JSON/XML payloads

Post-testing:

  • Document all findings with repro steps
  • Prioritize by risk (Critical → High → Medium → Low)
  • Provide remediation guidance

How Axum can help

We offer comprehensive API security testing:

  • API Discovery Audit – Find every API endpoint you didn't know existed
  • Manual Penetration Testing – Expert testers finding business logic flaws
  • Automated API Scanning – Continuous testing integrated into your CI/CD
  • GraphQL Security Assessment – Deep dive into GraphQL attack surfaces

Final thoughts

API security testing isn't optional. Attackers have shifted their focus to APIs because they know organizations haven't.

Start with the OWASP API Top 10. Test authentication and BOLA first — that's where most critical findings live. Automate what you can, but invest in manual testing for business logic.

And remember: Your API is already being probed by attackers. The only question is whether you'll find vulnerabilities before they do.


Want to test your APIs? Contact our team →

Read our full API security research: Download whitepaper →


Tags: API Security Penetration Testing BOLA GraphQL OWASP API Top 10

Related Topics

#API Security#Penetration Testing#BOLA#GraphQL#OWASP API Top 10

Share this article