What is API penetration testing?
An API (application programming interface) is how software talks to other software: your mobile app to your servers, your web front end to its back end, your platform to your customers’ systems. OWASP says APIs by nature expose application logic and sensitive data such as personally identifiable information, which is why attackers target them, and why OWASP keeps a separate API list alongside its web application Top 10.
An API penetration test attacks those endpoints directly. The tester reads the documentation, calls every endpoint with valid, invalid and malicious input, swaps tokens and IDs between users, and tries to reach data or functions the caller should not have. NIST SP 800-115 describes penetration testing as security testing in which assessors mimic real-world attacks to find ways around security features, and notes that the attack phase exploits a vulnerability to confirm it exists.
What is the OWASP API Security Top 10 (2023)?
The OWASP API Security Top 10 2023 is the current version of OWASP’s list of the top API security risks. Here is each one in plain English:
| Risk | What it means in plain English |
|---|---|
| API1:2023 Broken Object Level Authorization | A user can read or change someone else’s record just by changing an ID in the request. |
| API2:2023 Broken Authentication | Flaws in login, tokens or keys let an attacker pose as another user. |
| API3:2023 Broken Object Property Level Authorization | The API returns fields a user should not see, or accepts changes to fields they should not set. |
| API4:2023 Unrestricted Resource Consumption | No limits on requests, data or paid third-party calls, so an attacker can take the service down or run up your costs. |
| API5:2023 Broken Function Level Authorization | An ordinary user can call admin or other privileged functions. |
| API6:2023 Unrestricted Access to Sensitive Business Flows | A real feature, such as buying tickets or posting comments, can be automated at a scale that harms the business. |
| API7:2023 Server Side Request Forgery | The API fetches a URL the user supplies without checking it, so an attacker can make your server call places it should not. |
| API8:2023 Security Misconfiguration | Insecure or default settings somewhere in the API stack. |
| API9:2023 Improper Inventory Management | Old API versions and forgotten endpoints stay online and unpatched because nobody keeps track of them. |
| API10:2023 Unsafe Consumption of APIs | Your API trusts data from third-party APIs too much, so attackers go after the weaker integration instead. |
Authorization dominates the list: three of the ten entries (API1, API3 and API5) are about who may reach which object, field or function. OWASP says the first, broken object level authorization, is extremely common in API-based applications, according to its API1 entry. You can see exploited examples of these weakness types on Signal, our free threat-intelligence feed: authorization bypass through a user-controlled key (CWE-639), missing authorization (CWE-862), improper authentication (CWE-287) and server-side request forgery (CWE-918).
How is API pen testing different from web app testing?
The two overlap, and many tests cover both. PCI SSC guidance says that where a web application uses a back-end API, the API may be in scope, and that the functionality it exposes and the controls protecting it help decide whether it should be tested independently of the web app. The main differences:
| Web application test | API test | |
|---|---|---|
| How the tester works | Mostly through the user interface, in a browser | Directly against the endpoints, with crafted requests |
| Main reference list | OWASP Top 10 | OWASP API Security Top 10 |
| Finding the attack surface | Crawling the app’s pages and forms | Reading the documentation, then looking for undocumented endpoints and old versions |
| Typical findings | Includes browser-side issues such as cross-site scripting | Object and function authorization, excessive data in responses, missing rate limits, forgotten versions |
| What the tester needs | URLs and logins for each role | Documentation, keys or tokens, and test accounts for each role |
Some risks apply to both. Injection still matters for APIs: the OWASP testing guide notes that GraphQL just changes the entry point of a malicious payload, and classic flaws such as SQL injection, command injection and cross-site scripting apply through API parameters too. See SQL injection (CWE-89) on Signal. For the browser-facing side of an app, our guide to web application penetration testing covers the OWASP Top 10:2025 and the OWASP testing guide.
REST vs GraphQL: what changes in the test?
REST APIs expose resources at many URLs. The OWASP REST Security Cheat Sheet sets out what a test should check:
- Access control on every endpoint. OWASP says non-public REST services must perform access control at each API endpoint.
- Only the HTTP methods each endpoint needs are allowed; anything else is rejected.
- Passwords, security tokens and API keys never appear in the URL, where they can end up in logs.
- API keys are not the only protection for sensitive resources.
- Tokens such as JWTs are signed and fully checked, including issuer, audience and expiry.
- All input is validated for length, range, format and type, with limits on request size.
GraphQL APIs work differently. A GraphQL server operates on a single URL, usually /graphql, according to graphql.org, and clients ask for exactly the data they want in each query. That shifts the test toward the schema and the resolvers. The OWASP testing guide and the OWASP GraphQL Cheat Sheet point to these checks:
- Introspection. Introspection queries reveal the whole schema. OWASP recommends disabling them in production and publicly accessible environments.
- Authorization on every field. The OWASP testing guide says GraphQL does not enforce permissions by default, so each resolver has to check them.
- Query depth and cost. Deeply nested queries can exhaust CPU and memory. OWASP recommends depth limiting and query cost analysis.
- Batching. Many queries in one request can get around rate limits; the cheat sheet calls this a form of brute force attack specific to GraphQL.
- Injection. Arguments that reach a database or another back end can carry the same injection flaws as any other input.
What do you need to provide for an API pen test?
An API has no pages to click through, so the tester depends on what you give them. PCI SSC guidance says detailed documentation of components in scope, such as application-interface documentation, should be made available to the tester whenever possible, and strongly encourages supplying credentials so the tester can work as each role. A typical list:
- The API description. An OpenAPI (Swagger) file, a GraphQL schema or a request collection, plus any guide to how the API is meant to be used.
- Base URLs and environments. Which hosts and versions are in scope, and whether testing runs against production or a copy of it. Include old versions that are still online: OWASP says attackers usually get unauthorized access through old API versions or endpoints left running unpatched.
- Keys and tokens. API keys, OAuth client details or tokens for each type of caller.
- Test accounts for every role. Ideally two accounts per role, in separate tenants if your product is multi-tenant, so the tester can check whether one user can reach another’s data.
- Test data. Records the test accounts own, so object-level checks have something to work on.
- Rules of engagement. Testing windows, rate limits, endpoints to avoid (for example ones that send real emails or take real payments) and a contact if something goes wrong. PCI SSC guidance says these conditions should be documented and agreed before testing starts.
How much does an API penetration test cost?
| Source | API test | What they say moves the price |
|---|---|---|
| Synack (2026) | $5,000 to $30,000 | The number of endpoints and the complexity of authentication flows. Its example contrasts a small API with 15 endpoints and simple token authentication with a platform of 200+ endpoints, OAuth flows and multi-tier access controls. |
| Invicti | $4,000 to $20,000 | Endpoint count, authentication scenarios and business logic depth. |
As with any test, check whether retests are included and what the report contains. Our pen test cost guide covers every test type.
How often should you test an API?
APIs change with every release, and old versions tend to linger. That makes change the best trigger: a new version, new endpoints, a new authentication method or a new integration. PCI SSC’s penetration testing guidance (2017) says penetration testing must be performed at least annually and after any significant change, such as an application upgrade or modification. Our guide to how often to run a penetration test covers PCI DSS, SOC 2, HIPAA and insurers in more detail.
How does AvalonX fit?
AvalonX Artemis runs AI-driven penetration tests against websites, web apps, APIs and internet-facing hosts, and reports every finding ranked by severity, with evidence and a recommended fix. These are our published plans, as they appear on our pricing page:
| Plan | Price | Targets | Penetration testing | 12 months at list price |
|---|---|---|---|---|
| Essentials | $249/month | Up to 3 | A full pen test every 90 days | $2,988 |
| Pro | $599/month | Up to 10 | A full pen test every 30 days | $7,188 |
| 360 | $899/month | Up to 10 | A full pen test every 7 days | $10,788 |
Our free offering is a free external vulnerability scan. It is a scan, not a penetration test: it shows what anyone on the internet can see about a domain you own. New exploited vulnerabilities, by vendor and by weakness type, are tracked on Signal.
Quick answers
What is API penetration testing?
It is a security test in which a tester sends crafted requests straight to an API, the way an attacker would, to find and confirm weaknesses such as broken authorization, weak authentication and excessive data exposure. The result is a report of findings with severity, evidence and fixes.
What is the OWASP API Security Top 10?
It is OWASP’s list of the top 10 security risks for APIs. The current edition is from 2023. Its first entry is Broken Object Level Authorization, where a user can reach another user’s data by changing an object ID in the request.
How is API pen testing different from web application pen testing?
A web app test works mostly through the user interface in a browser. An API test sends requests directly to the endpoints, so it relies on documentation, keys and test accounts, and it looks for API-specific risks such as object-level authorization, excessive data exposure, missing rate limits and forgotten API versions.
What do I need to give an API penetration tester?
Usually the API documentation, such as an OpenAPI file or GraphQL schema, the base URLs for each environment, API keys or tokens, and test accounts for every user role, ideally two per role so the tester can check whether one user can reach another user’s data.
Does GraphQL need different testing from REST?
Partly. The core risks are the same, but GraphQL adds its own: introspection that reveals the schema, deeply nested queries that can exhaust resources, and batching that can get around rate limits. OWASP also notes that GraphQL does not enforce permissions by default.
How much does an API penetration test cost?
Synack’s 2026 pricing guide puts an API pen test at $5,000 to $30,000, driven by the number of endpoints and the complexity of authentication flows. Invicti puts API tests at $4,000 to $20,000.
Related guides
Sources
- OWASP, OWASP Top 10 API Security Risks, 2023. https://api-security.owasp.org/editions/2023/en/0x11-t10/
- OWASP, API Security Top 10 2023, Foreword. https://api-security.owasp.org/editions/2023/en/0x02-foreword/
- OWASP, API Security Top 10 2023, API1:2023 Broken Object Level Authorization. https://api-security.owasp.org/editions/2023/en/0xa1-broken-object-level-authorization/
- OWASP, API Security Top 10 2023, API9:2023 Improper Inventory Management. https://api-security.owasp.org/editions/2023/en/0xa9-improper-inventory-management/
- OWASP Cheat Sheet Series, REST Security Cheat Sheet. https://cheatsheetseries.owasp.org/cheatsheets/REST_Security_Cheat_Sheet.html
- OWASP Cheat Sheet Series, GraphQL Cheat Sheet. https://cheatsheetseries.owasp.org/cheatsheets/GraphQL_Cheat_Sheet.html
- OWASP, Web Security Testing Guide v4.2, 4.12.1 Testing GraphQL. https://wstg.owasp.org/v4.2/4-Web_Application_Security_Testing/12-API_Testing/01-Testing_GraphQL/
- GraphQL Foundation, Serving over HTTP. https://graphql.org/learn/serving-over-http/
- OWASP, OWASP Top 10:2025. https://top10.owasp.org/2025/
- NIST, SP 800-115, Technical Guide to Information Security Testing and Assessment, section 5.2. https://nvlpubs.nist.gov/nistpubs/Legacy/SP/nistspecialpublication800-115.pdf
- PCI Security Standards Council, Information Supplement: Penetration Testing Guidance, version 1.1, September 2017, sections 2.6, 4.1.2, 4.1.3 and 4.2.1. https://www.pcisecuritystandards.org/documents/Penetration-Testing-Guidance-v1_1.pdf
- Synack, How Much Does a Pentest Cost? (2026 Pricing Guide), June 2026. https://www.synack.com/?p=27316
- Invicti, How much does penetration testing cost in 2026? (Pricing Guide). https://www.invicti.com/blog/web-security/penetration-testing-pricing-guide
Last reviewed 5 December 2026.