UD bp hero bg 4 opt

API Security Testing: Methods, Tools, and What a Pentest Adds

15 min read November 29, 2026
Nazar Tymoshyk Nazar Tymoshyk CEO and the driving force behind UnderDefense
Summarize in:
OpenAI Perplexity Claude Grok

Your customer’s security review asks for your latest pentest report, and the API their integration will call was never in last year’s scope. Until you can answer that, the contract waits.

Here is what automated testing covers this week, and what needs a pentester.

TL;DR

  • This guide maps each risk in the 2023 API Security Top 10 to the testing method that finds it.
  • Six methods, from inventory to manual penetration testing, each catch some risks and miss others.
  • Five open-source tools are matched to those methods, and a release checklist covers what to do before, during, and after testing.
  • Authorization across roles and chained flaws need a human tester, so the API belongs in the pentest scope.
Table of contents

If that request lands on you as the chief technology officer (CTO), VP of Engineering, or chief information security officer (CISO), your REST or GraphQL APIs probably sit behind a gateway, documented in OpenAPI. They ship through a continuous integration (CI) pipeline in GitHub Actions or GitLab, where the automated half of this guide runs.

Last year’s scope said “web application,” yet the same code answers your customers’ integrations through the API, and nobody tested it that way.

Meme: an astronaut asks wait, it's all APIs, and a second astronaut answers always has been

Application programming interface (API) security testing checks that every endpoint authenticates the caller, authorizes each object and function, and handles input and third-party data safely. Some of that runs well in a pipeline, and some of it needs a tester holding two accounts who asks what happens when one of them opens the other’s invoice.

This guide maps your API to the API Security Top 10 (2023) from OWASP, the Open Worldwide Application Security Project, then matches six testing methods and five open-source tools to those risks. You also get a release checklist and what a pentest adds.

Add the API to your next pentest scope alongside the web app

What Makes API Security Testing Different From a Web App Pentest

A web app test follows what a user can click. An API test also checks the calls no screen makes: can one customer’s account open another customer’s invoice, and does every program calling the API prove who it is?

That’s what API security testing is for, and why the API needs its own line in the scope even when the same code runs your web app.

Web application penetration testing usually follows what a browser can click. An API exposes every operation in its spec, including the ones no screen calls, and four things make that surface different:

  • Object IDs in every call, such as /invoices/{id}, each needing its own ownership check
  • Machine-to-machine authentication with API keys, OAuth tokens, and JSON Web Tokens (JWTs)
  • Undocumented and old versions that still answer, such as a /v1 route after /v2 shipped
  • Third-party APIs your product consumes and trusts

Follow one request from the client through the gateway to the endpoint, the object it names, and the function it calls. The gateway usually checks authentication once, so object and function authorization have to be checked again inside each service, and those inner checks are where the most common API risks sit (the top of the OWASP list below).

The API attack surface: a request passes the gateway's authentication check, then reaches endpoints, objects, and functions

The National Institute of Standards and Technology (NIST) wrote in Special Publication (SP) 800-228, its “Guidelines for API Protection for Cloud-Native Systems” (June 2025, updated March 2026): “The enterprise estate cannot be protected without an accurate API inventory.” It warns that shadow APIs built for debugging or testing “often bypass standard security review practices,” so unlisted endpoints go unreviewed.

NIST also recommends tests that check each role sees only the data it is allowed to see (REC-API-12.3). For you, that means the test plan has to know your roles and the data each one may see, which a scope written for “the web application” never asked.

The fix starts with scope, and the API can sit in the same engagement as the web app among the types of penetration tests you already buy. UnderDefense, which publishes this guide, tests the API inside the same penetration test as the web application.

The OWASP API Security Top 10 (2023) as Your Test Plan

The OWASP API Security Top 10, 2023 edition, works as a test plan once each risk has a method that can find it. The table keeps OWASP’s IDs and names, gives a one-line example from an API like yours, and names one method that finds each risk and one that misses it, mapped by this guide from OWASP’s descriptions.

Risk (OWASP, 2023 edition) What it looks like in your API Method that finds it Method that misses it
API1:2023 Broken Object Level Authorization User A reads user B’s invoice by changing the ID Authorization tests, two accounts per role Scanning as one user
API2:2023 Broken Authentication Forged or expired tokens accepted; weak password reset Token scanning; manual tests of login flows Discovery and fuzzing
API3:2023 Broken Object Property Level Authorization A response leaks a hidden field, or a write sets “role” Schema tests, plus role-based write tests Scanning as one user
API4:2023 Unrestricted Resource Consumption No limit on page size, uploads, or paid text messages Fuzzing and rate tests outside production Discovery and schema tests
API5:2023 Broken Function Level Authorization A regular user calls an admin endpoint Authorization tests across roles Scanning as one user
API6:2023 Unrestricted Access to Sensitive Business Flows A script buys out stock or mass-creates accounts Manual penetration testing Scanning and fuzzing
API7:2023 Server Side Request Forgery A webhook URL field fetches internal addresses Scanning, then manual tests of URL inputs Schema tests
API8:2023 Security Misconfiguration Verbose errors, debug headers, permissive cross-origin settings Scanning with API-aware rules and templates Authorization tests
API9:2023 Improper Inventory Management An old /v1 or debug endpoint still answers Discovery against the spec; schema diffs Scans limited to the spec’s URLs
API10:2023 Unsafe Consumption of APIs A partner API’s response is trusted unvalidated Manual review and penetration testing Scanning your own endpoints

The methods named in the table are explained in the next section. Start with the first and fifth rows, because they decide your customer’s question. OWASP says object level authorization checks “should be considered in every function that accesses a data source using an ID from the user,” and a scanner holding one account has no way to tell your invoice from a stranger’s.

Two risks, API6 and API10, depend on a tester’s judgment more than on automated attack inputs. OWASP says API6 “doesn’t necessarily come from implementation bugs,” and that developers “tend to trust data received from third-party APIs more than user input,” which is why this guide maps both to manual testing.

⚠️ A clean scan report covers the rows marked for scanning and little else. If the customer’s questionnaire asks about authorization, the evidence has to come from the rows marked for authorization tests and manual testing, which is where the next section’s methods split.

Six API Security Testing Methods and What Each One Catches

Each method below catches a different slice of the ten risks, misses others, and belongs at a different point in the release cycle. In REST API security testing most of them start from the OpenAPI spec, while GraphQL APIs need their schema. Read each for what it misses as much as for what it finds.

1. Inventory and discovery

Inventory testing compares the API you documented with the API that answers. Pull the routes your gateway serves and the paths in its access logs, then diff them against the OpenAPI spec: anything live and undocumented is a shadow endpoint, and anything retired on paper but still answering is a zombie.

It catches forgotten and undocumented endpoints (API9) and gives every other method its target list. It misses flaws inside the endpoints it finds, and it runs first, before each release and whenever a team ships a new service.

2. Schema and contract testing against the OpenAPI spec

Schema testing generates requests from your OpenAPI spec and checks that each response matches it. It catches server errors on edge-case input, validation gaps, and responses carrying fields the spec never declared, which is how leaked hidden fields (API3) often show up.

It misses anything the spec gets wrong in the first place, since it trusts the contract. Run it on every pull request against a staging deploy, where a failure can block the merge.

3. Dynamic scanning (DAST)

Dynamic application security testing (DAST) sends attack payloads to a running API and reads the responses. API-aware scanners import the spec and test each operation for misconfiguration (API8), server-side request forgery (API7), injection, and known token weaknesses, much like the vulnerability scanning tools that already cover your hosts.

A scanner logged in as one user can’t see a flaw that only appears between two users, so it misses one user reading another’s data (API1), regular users calling admin functions (API5), and business-flow abuse (API6). Run it against staging on a schedule and again before each release.

4. Fuzzing, including stateful fuzzing

Fuzzing sends malformed, oversized, and unexpected values to find inputs that crash or slow the service, which covers much of unlimited resource use (API4). Stateful fuzzing goes further: it learns that POST /invoices returns an ID that GET /invoices/{id} consumes, then explores sequences a single request never reaches.

It misses flaws that return a clean response with the wrong data, because nothing looks broken. Run it in longer scheduled jobs against an isolated environment, since it creates and deletes data.

5. Authorization testing with two or more accounts per role

Authorization testing replays each request as a different user and a different role, then checks whether the response should have been allowed. The OWASP Web Security Testing Guide v4.2 (2020) says the best test uses “at least two (often more) users to cover different owned objects and functions.”

This is the method for cross-user reads (API1), writes to fields a role shouldn’t set (API3), and admin functions reached by regular users (API5), and tools can run part of it once you give them two sets of credentials. It misses business rules nobody wrote down, so run it before every release that changes roles, tenants (separate customer organizations inside your product), or permissions.

6. Manual penetration testing

A manual penetration test puts a person between the client and the API, usually in an intercepting proxy such as Burp Suite (its Community Edition is free), reading each request and changing it by hand. The tester chains findings, tests business flows for abuse (API6), and checks how far data from partner APIs is trusted (API10).

The same guide says a business logic flaw “cannot be detected by a vulnerability scanner and relies upon the skills and creativity of the penetration tester.” What manual testing misses is breadth between engagements, so it runs last in the release cycle, on top of the automated methods.

Put together, the six methods divide the ten risks between them. Each automated method finds a few of the ten risks, and only a manual tester combines several findings into one attack, which is why the vulnerability assessment vs penetration testing choice for an API with roles usually lands on a penetration test.

Six API security testing methods and the OWASP API Security Top 10 (2023) risks each one reaches

Open-Source API Security Testing Tools, Matched to Each Method

Four of the six methods above have a free, open-source tool that runs them, and each tool’s own documentation says what it needs and what it skips. The five below are free to use; the maintainer and license come from each tool’s repository, read in November 2026.

Tool Maintainer License Method Good at Misses or needs (its own docs)
ZAP ZAP Dev Team Apache-2.0 Dynamic scanning Active scans from OpenAPI or GraphQL definitions Scans the URLs found in the imported definition
RESTler Microsoft Research MIT Stateful fuzzing Request sequences inferred from the OpenAPI spec Cross-user checker is off by default
Schemathesis Schemathesis project MIT Schema testing, authorization checks Schema violations, server errors, cross-user reads Needs two users’ credentials; never repeats writes
Nuclei ProjectDiscovery MIT Template scanning Known misconfigurations and flaws, written as template files Finds what its templates describe
jwt_tool ticarpi GPL-3.0 Token testing Known JWT exploits, weak keys, claim tampering Tests JWTs only; takes the token as input

None of the five builds your inventory, so discovery stays a job for the gateway’s route list and access logs. Schemathesis’s guide also warns that “A clean run covers only the objects Schemathesis could tie to a user,” so a green authorization check tells you about the objects it saw and nothing else.

In GitHub Actions or GitLab CI, run Schemathesis on each pull request against the staging deploy, and run the ZAP API scan and Nuclei against staging before each release. RESTler belongs in a separate scheduled job, because its README describes exploring “deeper service states reachable only through specific request sequences.”

Keep the OpenAPI spec in the same repository, so every job tests the contract you’re about to ship. If a platform team or an outside partner for DevSecOps owns the pipeline, hand them this table as the job list.

Triage by OWASP ID before you count findings. A fuzzing crash is a reliability bug to fix even when nothing leaks, a misconfiguration finding is usually a ticket for the platform team, and any response that crossed a user or role boundary goes to the top of the queue.

💡 Tag each finding with its OWASP ID when you file it. The triage order then carries into the fix queue, and the authorization rows show what the customer’s review will ask about.

See which users can read each other’s data in your API

An API Security Testing Checklist for Your Next Release

Run this API security testing checklist for every release that adds an endpoint or changes who can call one. It follows the three stages of a test, before, during, and after, and each item uses a method from the six above:

  1. Before: Export the live route list and diff it against the OpenAPI spec, old versions included.
  2. Before: Update the spec to match what ships, with a response schema for every operation.
  3. Before: Create two test accounts per role, in two separate tenants if the product has tenants.
  4. Before: Stand up a non-production environment with realistic data that contains no customer records.
  5. During: Run schema tests and fuzzing against that environment from CI.
  6. During: Run the API scan and template checks, then token tests on every authentication flow.
  7. During: Replay sensitive requests as each other account and role.
  8. During: Record every request that crossed a role or tenant boundary, with its response.
  9. After: Fix each finding, then retest it with the same request that proved it.
  10. After: Update the spec and the inventory, and retire any endpoint the diff found.

✅ A release passes when items 7 and 8 come back empty, or when every crossing is fixed and retested. File the record from item 8 with the release notes, because it’s the evidence a customer’s reviewer will ask for.

The stages repeat with every release, and the after stage feeds the next before: the updated inventory becomes the next diff. Schemathesis’s README warns that it “sends real requests that create, change and delete data,” which is why item 4 comes before any test runs.

The API security testing release checklist in three stages: before, during, and after the test

What a Penetration Test Adds That Automated API Testing Cannot

A penetration test adds a person who chains flaws, tests business logic, and works across tenants and roles the way an attacker with a real account would. Automated API security testing checks each request against a rule, while a tester asks what a sequence of allowed requests can reach.

NIST SP 800-228 names that gap in its own terms: “engineered attacks realized through a sequence of requests that each pass all validation tests.” Each step looks valid to a scanner, so only someone following the whole sequence sees the attack.

Cross-tenant work is where most of the customer’s question lives. A tester logs in as an admin in tenant A and a viewer in tenant B, then tries every path between them, including exports, webhooks, and GraphQL queries that fetch nested objects.

The hardest flaws to automate come from two components reading one request differently. Your gateway may read the web address one way and decide the request is public, while the service behind it reads the same address slightly differently and sends it to a protected endpoint.

A gateway approves a request as public, and the router delivers it to a protected endpoint with no credentials

What the customer accepts is evidence: a penetration testing report with proof for each finding, a retest showing it’s closed, and often a letter of attestation they can file. A scan export rarely answers the authorization question on their list.

Book a test when a new public or partner API goes live, when a major version changes authentication or authorization, and when a customer or auditor asks.

If the API runs in AWS, Azure, or Google Cloud, cloud penetration testing covers the account behind it. Add the cloud account when the API’s roles reach cloud resources directly (storage buckets, queues, functions) or the customer’s questionnaire asks about cloud configuration; if the API only reads its own database, the API test answers the review.

How UnderDefense Tests APIs Inside a Penetration Test

UnderDefense, founded in 2017, tests your API by hand inside its penetration test, across the roles and tenants your customer is asking about. The Standard engagement starts from $8,000, runs about two weeks, and ends in a technical report and a Letter of Attestation you can file for SOC 2, ISO 27001, PCI DSS, or HIPAA reviews.

UnderDefense is rated 5.0 out of 5 from 83 reviews on G2 as of November 2026 and is ISO 27001 certified. Its engineers hold OSCP, OSCE, and CEH certifications.

A person verifies and exploits every finding, then documents it with proof and remediation steps. The method follows three public testing standards: the Penetration Testing Execution Standard (PTES), the Open Source Security Testing Methodology Manual (OSSTMM), and the OWASP Web Security Testing Guide.

You talk directly to the pentesters working on your scope, so the engineer who wrote your authorization middleware can ask why a finding matters.

Penetration test pricing is published by tier, and API testing starts at Standard:

Tier Starts from Duration API testing Reporting
External Perimeter $5,000 Up to 5 days Not included Summary reporting
Standard $8,000 About 2 weeks 1 application Technical report and Letter of Attestation
Professional $12,000 3 to 4 weeks 1 application Technical report and Letter of Attestation

The Letter of Attestation confirms the scope and the results, so the customer can file it without reading the full penetration testing report. After your fixes, UnderDefense retests at no extra cost, so the report your customer receives shows the authorization findings closed.

An external penetration test that UnderDefense wrote up in August 2026 shows what a scanner misses. A scanner with the right template can flag each of the three flaws it found, but it cannot show that together they gave the testers root, meaning full control of a vendor appliance.

The first step was the gateway flaw from the previous section: the authentication service and the routing layer read the same request URL differently. “The result is access to authenticated API endpoints with no credentials at all.” The same gap appears wherever a gateway and a service read one URL differently.

The two flaws behind it, Common Vulnerabilities and Exposures (CVE) entries CVE-2026-34908 and CVE-2026-34909, are “both rated CVSS 10.0,” the top Common Vulnerability Scoring System score, so they go first in any fix queue.

The team then “asked the appliance’s protected system API to describe itself,” and an internal update function reached through the bypass let them run their own commands (CVE-2026-34910). An over-permissive service account turned that into root on the appliance.

Have UnderDefense test your API across roles and tenants

Write the API Into Your Next Pentest Scope

A scope line that says “web application” leaves the tester guessing, so write the API in by name with everything a tester needs on the first day. The scope for the integration your customer will build should list:

  • Each base URL and environment, with the gateway in front of it
  • The current OpenAPI spec and GraphQL schema, plus every version still live
  • Every role, with two test accounts per role in two tenants
  • The third-party APIs the product calls and trusts
  • The customer’s question, in their own words

The pentest scoping questionnaire asks for most of this, and filling it in before the call keeps the first days of testing on your endpoints. Attach the spec and the role list, so the tester starts on the risks your customer named.

Roles, tenants, and endpoints decide where a quote lands above the published starting prices, so list them before you compare two proposals.

Get the API pentest report your customer’s review asked for

  • Review the endpoints, roles, and tenants your customer will ask about
  • Scope the test from your OpenAPI spec and the findings your tools produced
  • Get the technical report and a Letter of Attestation for your customer

Frequently Asked Questions

What is API security testing?

API security testing checks that an API authenticates every caller, authorizes every object and function, and handles input and third-party data safely. It combines automated methods, such as schema testing, scanning, and fuzzing, with authorization tests across accounts and manual penetration testing for chained and business logic flaws.

How do you test API security?

Start with an inventory checked against your OpenAPI spec, then run schema tests, an API-aware scan, and fuzzing in a non-production environment. Replay sensitive requests with two accounts per role, record any response that crosses a boundary, and add a manual penetration test for chained flaws and business logic. Retest every fix.

What is the difference between API security testing and API penetration testing?

API security testing is the whole program, automated and manual, run across releases. API penetration testing is one part of it: a person attacks the API by hand, chains flaws, and tests authorization across roles and tenants, then delivers a report with proof and a retest that a customer or auditor can accept.

Which tools are used for API security testing?

Common open-source tools include ZAP for API-aware scanning, Schemathesis for schema and authorization checks, RESTler for stateful fuzzing, Nuclei for template-based checks, and jwt_tool for JSON Web Token testing. Manual testers usually work in an intercepting proxy. Each tool covers one method, so a test plan uses several.

How much does an API penetration test cost?

UnderDefense publishes its starting prices: API testing is included from the Standard tier, from $8,000 for about two weeks, and Professional starts from $12,000 for 3 to 4 weeks. Both end in a technical report and a Letter of Attestation, and the retest after your fixes costs nothing extra. UnderDefense penetration testing scopes the API by roles, tenants, and endpoints.

Nazar Tymoshyk

Nazar Tymoshyk

CEO and the driving force behind UnderDefense

Nazar Tymoshyk is a visionary cybersecurity expert with extensive industry experience, holding a Ph.D. in Information Security, an MBA, and a degree in Computer/Information Technology Administration and Management.

Nazar’s contributions to cybersecurity have earned him recognition as a respected leader in the field. His insights have been featured in leading publications, including The Wall Street Journal, TechCrunch, and TechRepublic.

As the founder of UnderDefense, Nazar has demonstrated exceptional leadership, growing the company into a recognized provider of advanced cybersecurity solutions known for its innovative approach and strong commitment to client success. His mission is to transform how businesses approach cybersecurity by delivering tailored solutions for every stage of growth.

Nazar’s dedication to national cybersecurity also led him to serve in CERT-UA, where he played a key role in strengthening Ukraine’s cyber defense capabilities.

Need a pentest for an audit or a customer?

  • Scope and price within one business day
  • Report with exploitable findings and fixes
  • Free retest after remediation
Automated Security Remediation: Which Actions Are Safe to Hand Over

Automated Security Remediation: Which Actions Are Safe to Hand Over

Your security tools can disable an account or isolate a server in seconds, so the chief information officer (CIO) asks which of those actions the tools may take at 3 a.m. without asking anyone. Without an answer, teams leave automation off, or switch it on and roll it...

Cloud SIEM: What It Solves and What It Quietly Moves Onto Your Team

Cloud SIEM: What It Solves and What It Quietly Moves Onto Your Team

Your cloud security information and event management (SIEM) platform went live in days, and the servers are gone. Then the first full invoice beat the estimate. And nobody watches alerts after 6 p.m., so a stolen account flagged at 2 a.m. waits until 9. A cloud SIEM...