What is API penetration testing?
API penetration testing is an attack on your endpoints that skips the user interface and talks to the server directly, the way an attacker does. Grapefruit calls your REST and GraphQL APIs with test accounts you supply, changes what a normal client would never change, and reports every call that returned data or power it should have refused.
Your front end hides buttons. Your API has to enforce rules. The gap between the two is where API breaches happen: the endpoint that trusts an ID, the field nobody expected a client to send, the admin route that checks for a login and nothing else.
How does coverage map to the OWASP API Security Top 10 2023?
Every test covers all ten categories of the OWASP API Security Top 10 2023, from API1 Broken Object Level Authorization to API10 Unsafe Consumption of APIs. Findings in your portal are ranked critical, high, medium or low, and each one carries the captured request and response, so a category name always comes with proof.
| OWASP API Security Top 10 2023 | What we attack | Example finding |
|---|---|---|
| API1 Broken Object Level Authorization | Object IDs in paths, queries and bodies, swapped across accounts and tenants | Changing an invoice ID returns another customer's invoice |
| API2 Broken Authentication | Login, token issue and refresh, password reset, key handling | A refresh token that still works after logout |
| API3 Broken Object Property Level Authorization | Fields a client can read or write beyond its role | A profile update that accepts a role field and makes the caller an admin |
| API4 Unrestricted Resource Consumption | Page sizes, batch sizes, query depth and upload limits | A page size parameter with no ceiling |
| API5 Broken Function Level Authorization | Admin and internal operations called with an ordinary user's token | A normal user calls the delete user endpoint and it works |
| API6 Unrestricted Access to Sensitive Business Flows | Signup, checkout, invite and referral flows driven by script | A referral credit claimed again and again from one account |
| API7 Server Side Request Forgery | Parameters that make your server fetch a URL | A webhook URL field that reaches an internal service |
| API8 Security Misconfiguration | Cross-origin rules, verbose errors, default settings, debug routes | An error message that prints the database query |
| API9 Improper Inventory Management | Old versions and undocumented routes on the hosts you verify | A v1 endpoint still live without the checks v2 enforces |
| API10 Unsafe Consumption of APIs | Data your API accepts from third party services and trusts | A partner webhook payload stored and served to users unchecked |
What do real API attacks look like?
Most serious API findings are simple to describe and expensive to suffer. Nothing exotic is involved. The attacker has a valid account, reads the traffic their own browser sends, and edits one value. These four patterns show up in APIs of every size, and each is tested on every endpoint Grapefruit can reach.
- Reading another customer's record. A request fetches order 1041. The attacker asks for order 1042. The server checks that the caller is logged in, not that the order is theirs, and returns a stranger's name, address and purchase. That is BOLA, the top risk on the OWASP list.
- Calling an admin function as a normal user. The admin panel is hidden from regular accounts, but the endpoint behind it is not. A standard user sends the same call the admin panel sends, and the server suspends an account or exports the user table.
- Mass assignment. The profile form sends a name and an email. The attacker adds a role field set to admin. The server saves every field it receives, and a trial user now runs the workspace.
- A tool endpoint that trusts the model. Your AI assistant calls an internal endpoint with arguments the model chose. An attacker steers the model, by prompt or by planted content, into sending a different customer ID. The endpoint trusts the arguments and returns that customer's data.
Do you test both REST and GraphQL?
Yes, both, in the same test. REST endpoints are attacked route by route and method by method. GraphQL gets attention where it differs: one endpoint, many operations, and authorization that has to hold on every field and every nested object, not just at the front door.
GraphQL makes some attacks easier. A single query can walk from your own user to your team, to another team's members, to their billing details, if any link in that chain skips its check. Grapefruit follows those paths, tries mutations as the wrong role, and reports the exact query that got through.
- REST: every verb on every route, including the ones your client never calls.
- GraphQL queries: nested objects and fields requested across roles and tenants.
- GraphQL mutations: write operations attempted as users who should be read-only.
- Both: tokens, sessions and error responses checked along the way.
Why does replayable proof matter for API findings?
An API finding is a request, so the proof should be a request. Grapefruit gives your engineer the exact call that worked and the response that came back. They paste it, run it and see another tenant's data on their own screen. After the fix, the same call returns a refusal.
Buyers ask for this. In a Pentest-Tools survey of 158 respondents in June 2026, 53% ranked proof of exploit as a top buying factor. For APIs the proof is also the regression test: keep the request, and you can check the fix again any time.
What about the APIs behind your AI features?
They are tested in the same run. LLM features and AI agents reach your data through API endpoints, and those endpoints are often the least defended in the product because the only expected caller is your own model. Grapefruit attacks the chat, the agent and the endpoints behind them together.
This is where fixes lag. Cobalt's 2025 State of Pentesting data, as reported by CSO Online, found that 48% of pentest findings get fixed, and only 21% of findings in generative AI apps. A finding with a replayable request is one an engineer can fix this sprint.
How do you start an API pentest?
Start today, in a few minutes. Add the API hostname, publish one DNS TXT record to verify it, sign the testing authorization online and add test accounts. Testing starts and results land within hours of kickoff. A full penetration test is a fixed quote. Maintenance plans re-test weekly or monthly. See pricing.
Questions
- What is the difference between API penetration testing and web application penetration testing?
- A web application test drives the product through its pages and forms. An API test talks straight to the endpoints, including ones no page ever calls. Most products need both, and Grapefruit runs them as one test with one report, because an attack that starts in the browser usually ends at an API.
- What do you need from us to test an API?
- The hostname, one DNS TXT record to verify it, an online signature on the testing authorization, and test accounts. Accounts in two roles and two tenants give the best coverage, because the most damaging API flaws are one customer reaching another customer's data or a normal user reaching admin functions.
- Do you cover the OWASP API Security Top 10?
- Yes. Coverage maps to all ten categories of the OWASP API Security Top 10 2023, from API1 Broken Object Level Authorization through API10 Unsafe Consumption of APIs. Each finding in the portal is ranked by severity and comes with the captured request and response that proves it.
- Can you test a GraphQL API?
- Yes. GraphQL is tested alongside REST. Queries are run across roles and tenants to find fields and nested objects that skip authorization, and mutations are attempted as users who should not be able to write. Every finding includes the exact query or mutation, ready to replay.
- How quickly do we get results?
- Within hours of kickoff. Findings appear in the online portal as they are confirmed, ranked critical, high, medium or low. Traditional engagements commonly take 2 to 4 weeks to start and deliver the report 1 to 2 weeks after testing, according to Stingrai.
- What happens when our API changes next month?
- On a maintenance plan it is tested again. Verified domains are re-tested every week or every month, and each dated run shows what is new and what got fixed since the last one. A new endpoint that shipped without an ownership check shows up in the next run.