API penetration testing for SaaS: a buyer's guide
API penetration testing for SaaS explained: OWASP API Top 10 risks like BOLA, REST and GraphQL scoping, and what testers find that scanners miss.
Axrok Team8 min read
If you run a SaaS product, your API carries most of the decisions that matter for security. Your web app, mobile app and integrations all call it, and every request asks the same question: is this user allowed to see or change this data?
This guide explains what API penetration testing covers, how to scope one, and what testers do that scanners do not, for founders and CTOs preparing for SOC 2, ISO 27001, investor due diligence or an enterprise security review.
Key takeaways
- API penetration testing is an authorized, hands-on attempt to break your API the way a real attacker would, using the OWASP API Security Top 10 2023 as a shared reference.
- Broken Object Level Authorization (BOLA) is first on the OWASP list, and testing for it properly needs accounts in more than one role and, for multi-tenant products, more than one tenant.
- Good scoping covers REST and GraphQL endpoints, every user role, and your API documentation or Postman collections.
- Scanners report the possible existence of a weakness. A penetration test tries to exploit it to confirm it, as NIST SP 800-115 describes.
- Old API versions and undocumented endpoints belong in scope, because OWASP and NIST both treat API inventory as a security issue.
What API penetration testing is
NIST SP 800-115 defines penetration testing as "security testing in which assessors mimic real-world attacks to identify methods for circumventing the security features of an application, system, or network." An API penetration test applies that idea to the interfaces behind your product: REST endpoints, GraphQL endpoints, webhooks and the authentication that protects them.
An API test goes underneath the browser. Testers call endpoints directly, change parameters, and replay requests as different users to see what the server allows.
The OWASP API Security Project explains why this matters. It says that "many APIs do not undergo the rigorous security testing that would help make them secure from an attack." Its 2023 list also notes that "APIs tend to expose more endpoints than traditional web applications, making proper and updated documentation highly important."
The OWASP API Security Top 10 2023, in plain terms
The OWASP API Security Top 10 2023 is a free, public list of ten API security risks. It gives buyers, developers and testers a common vocabulary.
Broken Object Level Authorization (BOLA)
BOLA is API1:2023, first on the list. OWASP describes attackers "manipulating the ID of an object that is sent within the request." A simple example: a user who can view their own invoice at /invoices/1001 changes the number to 1002 and sees someone else's invoice.
OWASP calls this issue "extremely common in API-based applications," because the server "relies more on parameters like object IDs, that are sent from the client to decide which objects to access." The impact can include data disclosure, data loss or data manipulation, and under certain circumstances, full account takeover.
Authorization at the property and function level
Two more entries deal with authorization:
- API3:2023 Broken Object Property Level Authorization. Users can read or change fields inside an object that they should not touch. OWASP notes that this category combines the 2019 entries Excessive Data Exposure and Mass Assignment.
- API5:2023 Broken Function Level Authorization. A regular user reaches an administrative function. OWASP links this to "an unclear separation between administrative and regular functions."
Authentication, resource limits and business flows
- API2:2023 Broken Authentication covers flawed login and token handling that can let attackers "assume other user's identities temporarily or permanently."
- API4:2023 Unrestricted Resource Consumption covers missing limits. OWASP notes that successful attacks "can lead to Denial of Service or an increase of operational costs," including paid per-request services such as email or SMS.
- API6:2023 Unrestricted Access to Sensitive Business Flows covers a legitimate flow, such as buying a ticket or posting a comment, being abused at scale. OWASP points out that this "doesn't necessarily come from implementation bugs."
SSRF, misconfiguration, inventory and third parties
The rest of the list covers Server Side Request Forgery (API7), Security Misconfiguration (API8), Improper Inventory Management (API9) and Unsafe Consumption of APIs (API10). The last one is relevant to SaaS products built on integrations. OWASP observes that developers "tend to trust data received from third-party APIs more than user input."
What testers do that scanners do not
Automated scanners are fast and repeatable. NIST SP 800-115 draws the line clearly: "While vulnerability scanners check only for the possible existence of a vulnerability, the attack phase of a penetration test exploits the vulnerability to confirm its existence."
NIST also notes that manual processes "can identify new or obscure vulnerabilities that automated scanners may miss." We cover the wider difference in our post on penetration test vs vulnerability scan.
For APIs, the gap shows most clearly around authorization. A scanner sees a request that returns a successful response. It cannot tell whether the record in that response belongs to the user who asked for it. Answering that needs context: which roles exist, which tenant owns which data, and what each role is meant to do.
In practice, a tester will:
- Log in as user A, capture a request, and replay it with user B's session to check object level access.
- Call administrative endpoints from a low privilege account to check function level access.
- Add unexpected fields to write requests to see whether the API accepts them.
- Chain small findings together. NIST notes that most penetration tests look for "combinations of vulnerabilities on one or more systems that can be used to gain more access than could be achieved through a single vulnerability."
How to scope an API penetration test
Scope decides what gets tested. A loose scope leaves gaps.
REST and GraphQL endpoints
List every API in scope: public, partner and internal, along with the environment to be tested. GraphQL needs specific attention. The OWASP GraphQL Cheat Sheet lists risks that include "Batching Attacks, a GraphQL-specific method of brute force attack," abuse of broken authorization, and insecure default configurations such as introspection and GraphiQL left enabled.
OWASP's own BOLA examples include a GraphQL mutation that deletes a document by its ID "without any further permission checks," so GraphQL needs the same authorization checks as REST.
Authentication and user roles
Testers need working accounts. For a SaaS product, plan for at least two users in each role and, for multi-tenant products, accounts in two separate tenants. Object level flaws are found by replaying one identity's request as another, so a single test account limits what can be checked.
Share your role and permission model as well: who can read, edit, delete or export each type of record. A tester can only call something a flaw if they know the rule it breaks.
Documentation and Postman collections
Give testers your OpenAPI (Swagger) file, GraphQL schema or a maintained Postman collection. This shortens discovery and exposes every parameter. NIST SP 800-228, published in June 2025, recommends that "All APIs must have a specification" and that organizations maintain an inventory of internal and external APIs, "including shadow and Zombie APIs."
Old versions and forgotten endpoints
Include older versions, such as a v1 still running beside v2. NIST warns that deprecated APIs "risk falling behind the latest security policies and protections." OWASP's API9 entry names "deprecated API versions and exposed debug endpoints" as inventory risks. A good test compares what the tester discovers against what you documented.
Rules of engagement
Agree in writing on test windows, rate limits, handling of production data and an emergency contact. NIST SP 800-115 describes a planning phase in which "rules are identified, management approval is finalized and documented, and testing goals are set."
If your API runs on AWS, note that the AWS penetration testing policy prohibits request flooding, including "API request flooding." Resource limit checks should be agreed in advance and kept to low volume.
What a useful API pentest report shows
For each finding, a useful report shows the request and response that prove it, the affected role or tenant, and a fix your developers can act on. If the report is for SOC 2 or ISO 27001, ask whether findings can be referenced to the controls your auditor will review. Our GRC and compliance team can help connect test results to your control set.
When to run an API penetration test
Common moments to test include:
- Before a SOC 2 or ISO 27001 audit window.
- Before an enterprise deal or investor due diligence, when a buyer asks for recent third-party test results.
- After major changes, such as a new GraphQL layer, a new authentication provider, a new public API or a new partner integration.
Between tests, ongoing monitoring helps you catch new exposure as your product changes. See our managed security services and our wider penetration testing services.
FAQ
What is the difference between API security testing and API penetration testing?
API security testing is the broad term. It can include automated scanning, code review and runtime checks. API penetration testing is a hands-on type in which testers attempt real attacks against your API to confirm which weaknesses can be exploited, in line with how NIST SP 800-115 describes penetration testing.
Do testers need accounts and documentation?
For an authenticated test, yes. Accounts in each role, and in two tenants for multi-tenant products, let testers check cross-user access. An OpenAPI file, GraphQL schema or Postman collection shortens discovery, and NIST SP 800-228 recommends that every API has a specification.
Can GraphQL APIs be penetration tested?
Yes. GraphQL needs its own checks. The OWASP GraphQL Cheat Sheet highlights batching attacks, broken authorization, and insecure defaults such as introspection and GraphiQL enabled in production.
Should we test staging or production?
Either can work. If you test staging, it should match production closely, including authentication and roles. If you test production, agree on rules of engagement first, because NIST SP 800-115 notes that systems "may be damaged or otherwise rendered inoperable" during penetration testing and that this risk "can never be fully eliminated."
Talk it through
If a SOC 2 audit, an enterprise deal or investor due diligence is coming up and you are not sure what an API test should cover, we are happy to talk it through. Book a free 15-minute call to see whether a penetration test fits your situation, at axrok.com/contact or by emailing zayan@axrok.com.
Sources
- OWASP API Security Top 10 2023
- OWASP API1:2023 Broken Object Level Authorization
- OWASP API Security Project
- OWASP GraphQL Cheat Sheet
- NIST SP 800-115, Technical Guide to Information Security Testing and Assessment
- NIST SP 800-228, Guidelines for API Protection for Cloud-Native Systems
- AWS Penetration Testing policy