# API security testing checklist: what to check on every endpoint

Published: 2026-11-19 · Updated: 2026-11-16 · By HackerGPT Team
Canonical: https://hackergpt.org/blog/api-security-testing-checklist/

> A per-endpoint API security checklist organised along the OWASP API Security Top 10 (2023), with the requests to send, the answers to expect, and what it found on CyberGym.

**TL;DR:** An API security testing checklist is a short set of requests you send to every endpoint, not a list you read once. For each endpoint, call it with no session, with a forged token, as the user who owns the object and as a different user, then check the response body against the ten categories of the OWASP API Security Top 10 (2023). The bugs that matter most in APIs, broken object and function authorization, only show up when you compare those callers side by side.

This checklist is for developers and app owners who build an API and want to test it the way an attacker would read it: endpoint by endpoint. You will get the checks, the request that runs each one, and the answer a safe endpoint gives. We ran them against [CyberGym](https://cybergym.hackergpt.app), our deliberately vulnerable practice target, on 16 November 2026, using two accounts we registered for the purpose. Run these checks only on an API you own or have written permission to test.

## What should an API security testing checklist cover?

It should cover every endpoint your app serves, each one tested against the ten risks in the [OWASP API Security Top 10 2023](https://api-security.owasp.org/editions/2023/en/0x11-t10/), with more than one caller. A checklist that lists the ten risks but tests each endpoint only once, with your own admin session, misses much of what the list is about: three of the ten categories (API1, API3 and API5) are authorization checks, and they only fail when someone with less access than you makes the request.

Turn each category into a question you can ask of one endpoint:

| OWASP API 2023 | The question for this endpoint |
| --- | --- |
| [API1 Broken Object Level Authorization](https://api-security.owasp.org/editions/2023/en/0xa1-broken-object-level-authorization/) | If I change the ID in the request to someone else's, do I get their object? |
| [API2 Broken Authentication](https://api-security.owasp.org/editions/2023/en/0xa2-broken-authentication/) | Does it refuse a missing, forged, expired or logged-out token? |
| [API3 Broken Object Property Level Authorization](https://api-security.owasp.org/editions/2023/en/0xa3-broken-object-property-level-authorization/) | Does the response return fields I should not see, and does the request accept fields I should not set? |
| [API4 Unrestricted Resource Consumption](https://api-security.owasp.org/editions/2023/en/0xa4-unrestricted-resource-consumption/) | Is there a page size, a request limit, a cap on upload size? |
| [API5 Broken Function Level Authorization](https://api-security.owasp.org/editions/2023/en/0xa5-broken-function-level-authorization/) | Can a regular user call an admin action or method? |
| [API6 Unrestricted Access to Sensitive Business Flows](https://api-security.owasp.org/editions/2023/en/0xa6-unrestricted-access-to-sensitive-business-flows/) | Can a script repeat this flow (sign-up, checkout, coupon) faster than a person would? |
| [API7 Server Side Request Forgery](https://api-security.owasp.org/editions/2023/en/0xa7-server-side-request-forgery/) | Does it fetch a URL I supply? |
| [API8 Security Misconfiguration](https://api-security.owasp.org/editions/2023/en/0xa8-security-misconfiguration/) | What do its errors, CORS and headers reveal? |
| [API9 Improper Inventory Management](https://api-security.owasp.org/editions/2023/en/0xa9-improper-inventory-management/) | Is it documented, owned and the current version, or a leftover? |
| [API10 Unsafe Consumption of APIs](https://api-security.owasp.org/editions/2023/en/0xaa-unsafe-consumption-of-apis/) | Does it trust data it gets from a third-party API? |

Most of these questions need a second account. Create two test users of your own before you start, user A and user B, each with at least one object (a basket, an order, a document) that belongs to them.

## How do I find every endpoint to test first?

Build the inventory before the checklist: you cannot test an endpoint you do not know exists. Crawl the app while logged in, record every request the front end makes, read the JavaScript bundles for routes the UI never calls, and write down for each endpoint which authentication it is supposed to require. [Map a web app's attack surface before you test it](https://hackergpt.org/blog/map-web-app-attack-surface/) walks through that process, and [AppMap](https://hackergpt.org/features/appmap/) does it as a crawl that lists every API endpoint with its auth requirement.

Then export the list, so the checklist runs against a file rather than your memory. [Export your API endpoints to Postman or OpenAPI](https://hackergpt.org/blog/export-api-endpoints-postman-openapi/) covers the format and a first auth test built from it. The inventory is also the first check of API9: an endpoint that appears in the crawl but not in your documentation is already a finding.

## How do I test API security, endpoint by endpoint?

Send each endpoint the same four callers, then read what comes back. The status code is a start; the body decides.

![Four callers per endpoint: no session, a forged token, the owner and another user, each with the answer it should get](https://hackergpt.org/blog/api-security-testing-checklist/four-callers.webp)

*The four callers. An endpoint that answers the bottom two the same way has no object-level check.*

Here is the checklist, in the order we run it. Each line is one request or a small group of them.

1. **No session (API2).** Call it without any token or cookie. Anything that is not public must answer `401`.
2. **Forged and expired token (API2).** Send `Authorization: Bearer abc.def.ghi`, then a token from before you logged out. Both must fail. [Broken authentication examples](https://hackergpt.org/blog/broken-authentication-examples/) covers logout, password change and 2FA.
3. **Another user's object (API1).** As user A, request user B's object by its ID. The answer must be `403` or `404`, never B's data. [IDOR vulnerability example](https://hackergpt.org/blog/idor-vulnerability-example/) shows the bug and the fix in code.
4. **Fields in the response (API3).** Read the whole JSON body, including the token payload. Password hashes, internal flags, other users' emails and secrets have no business there.
5. **Fields in the request (API3).** Add a property the form never sends, such as `role` or `isAdmin`, and see if it sticks. On CyberGym this is how [privilege escalation](https://hackergpt.org/blog/privilege-escalation-web-app/) starts.
6. **Admin functions as a regular user (API5).** As user A, call the list, delete and update endpoints that only an admin should reach, and try other methods on ordinary routes (`PUT`, `DELETE`).
7. **Limits (API4).** Ask for a huge page (`?limit=100000`), send the request many times, upload a large file. Look for a cap, a `429`, or `RateLimit` headers. [Rate limiting test](https://hackergpt.org/blog/rate-limiting-test/) shows how to check a login without hammering it.
8. **Business flows (API6).** For sign-up, checkout, coupons and anything else with value, ask what stops a script from running it a thousand times. [Business logic vulnerabilities](https://hackergpt.org/blog/business-logic-vulnerabilities-examples/) has examples.
9. **URLs in parameters (API7).** Any field that takes a URL (an avatar link, a webhook, an import) is an SSRF candidate. Test it only against a server you control; [SSRF example](https://hackergpt.org/blog/ssrf-example/) explains what to look for and how to fix it.
10. **Errors, CORS and headers (API8).** Send malformed JSON and an `Origin` header from another site. Look for stack traces, versions and `Access-Control-Allow-Origin: *` on endpoints that return private data.
11. **Inventory (API9).** Compare the endpoint against your documentation, and look for old versions (`/v1/`), debug routes and metrics endpoints left open.
12. **Third-party data (API10).** Where the endpoint passes on data from another API, check that it validates it like user input: types, sizes, redirects, and TLS.

## What did the checklist find on CyberGym's API?

On CyberGym, the checklist turned up broken object and function authorization, data exposed in the token, no page limits, verbose errors and an incomplete API inventory. Some checks passed: every private endpoint refused a forged token, and an admin delete was refused to a customer. CyberGym runs OWASP Juice Shop, version 19.1.1 on the day of our run:

```bash
BASE=https://cybergym.hackergpt.app
curl -s "$BASE/rest/admin/application-version"
```

```json
{"version":"19.1.1"}
```

### The four-caller matrix

We registered two accounts and logged in as each (`POST /rest/user/login` returns the token in `authentication.token`). User A's basket is `15`, user B's is `16`; their user IDs are `32` and `33`. Then we ran this script with both tokens:

```bash
#!/usr/bin/env bash
# Usage: TOKEN_A=... TOKEN_B=... ./matrix.sh endpoints.txt
BASE=${BASE:-https://cybergym.hackergpt.app}
printf '%-38s %6s %6s %6s %6s\n' ENDPOINT ANON FORGED USER_A USER_B
while read -r path; do
  [ -z "$path" ] && continue
  anon=$(curl -s -o /dev/null -w '%{http_code}' "$BASE$path")
  forged=$(curl -s -o /dev/null -w '%{http_code}' -H 'Authorization: Bearer abc.def.ghi' "$BASE$path")
  a=$(curl -s -o /dev/null -w '%{http_code}' -H "Authorization: Bearer $TOKEN_A" "$BASE$path")
  b=$(curl -s -o /dev/null -w '%{http_code}' -H "Authorization: Bearer $TOKEN_B" "$BASE$path")
  printf '%-38s %6s %6s %6s %6s\n' "$path" "$anon" "$forged" "$a" "$b"
done < "$1"
```

```text
ENDPOINT                                 ANON FORGED USER_A USER_B
/rest/basket/15                           401    401    200    200
/rest/basket/16                           401    401    200    200
/api/Users/32                             401    401    200    200
/api/Users/33                             401    401    200    200
/api/Users                                401    401    200    200
/rest/user/whoami                         200    200    200    200
/api/Products                             200    200    200    200
/rest/admin/application-configuration     200    200    200    200
/metrics                                  200    200    200    200
```

Read it row by row. The first two columns are good news: every private endpoint refused both no session and a forged token. The last two columns are the finding. Both users get `200` on both baskets and both user records, so nothing checks *whose* object it is.

Two rows show why the body matters more than the status. `/rest/user/whoami` answers `200` to everyone, but with a forged token the body is `{"user":{}}`: it is a public "who am I" endpoint that returns nothing for a bad token, which is fine. A status-only scanner would have flagged it. `/api/Products` is public by design; the product catalogue is meant to be readable.

### API1: user A reads user B's basket

```bash
curl -s "$BASE/rest/basket/16" -H "Authorization: Bearer $TOKEN_A"
```

```json
{"status":"success","data":{"id":16,"coupon":null,"UserId":33,"createdAt":"2026-11-16T08:21:42.665Z","updatedAt":"2026-11-16T08:21:42.665Z","Products":[]}}
```

The response even names the owner, `"UserId":33`, which is not the caller. That is the textbook API1 shape. `/api/Users/33` behaved the same way: user A got user B's email, role and last login IP.

### API2 and API3: what the token carries

Decoding user A's JWT showed what every holder of the token can read:

```bash
python3 -c 'import sys,json,base64; p=sys.argv[1].split(".")[1]; d=json.loads(base64.urlsafe_b64decode(p+"="*(-len(p)%4))); print(sorted(d), sorted(d["data"]))' "$TOKEN_A"
```

```text
['data', 'iat', 'status'] ['createdAt', 'deletedAt', 'deluxeToken', 'email', 'id', 'isActive', 'lastLoginIp', 'password', 'profileImage', 'role', 'totpSecret', 'updatedAt', 'username']
```

The payload has a `password` field (the password hash) and a `totpSecret`, and there is no `exp` claim, so the token does not expire. [JWT vulnerabilities](https://hackergpt.org/blog/jwt-vulnerabilities-examples/) goes deeper into what to check in a token.

### API4: the page size is not limited

```bash
curl -s "$BASE/api/Products" | python3 -c 'import sys,json; print(len(json.load(sys.stdin)["data"]))'
curl -s "$BASE/api/Products?limit=1" | python3 -c 'import sys,json; print(len(json.load(sys.stdin)["data"]))'
```

Both printed `36`: the list endpoint returned every product either way and ignored `limit`. No `RateLimit` or `Retry-After` header came back. With 36 rows that costs nothing; on a table with a million rows, the same endpoint is a cheap way to load your database.

### API5: a customer lists every user

The matrix row for `/api/Users` hides the problem in plain sight: a customer gets `200`. The body was the full list of registered accounts, each with email, role and last login IP. We counted the records and read the field names only, because the other accounts belong to other CyberGym users. Not every function check failed:

```bash
curl -s -o /dev/null -w '%{http_code}\n' -X DELETE "$BASE/api/Products/999999" \
  -H "Authorization: Bearer $TOKEN_A"
```

```text
401
```

The delete is refused to a customer. We used a product ID that does not exist, so even a missing check would have changed nothing; use the same trick on your own API when you test destructive methods.

### API8: errors, CORS and headers

A request with broken JSON returned `500` and an HTML page with the full stack trace, starting:

```bash
curl -s -X POST "$BASE/rest/user/login" -H 'Content-Type: application/json' -d '{"email":'
```

```text
500 SyntaxError: Unexpected end of JSON input
    at JSON.parse (<anonymous>)
    at jsonParser (/home/admin/juice-shop/build/server.js:315:33)
```

The same page names the framework, Express 4. The product search, called with a foreign `Origin` header, answered with `Access-Control-Allow-Origin: *`. On a public product search that is harmless; on an endpoint that returns private data with a bearer token, check what your CORS policy allows.

### API9: the documentation describes one endpoint

CyberGym serves Swagger UI at `/api-docs/`. The spec it loads lists a single path, `/orders`, under the server `/b2b/v2`. Everything in the matrix above, and every other `/api/` and `/rest/` route, is undocumented. Two more endpoints answered anonymously: `/rest/admin/application-configuration`, the shop's configuration, and `/metrics`, a Prometheus feed with Node.js runtime numbers and app counters such as registered users and orders placed.

None of this is surprising in an app built to be vulnerable, and that is the point: these are the shapes to look for in your own API.

![Ten checks run on CyberGym API endpoints, grouped by OWASP API Top 10 category, with the answer observed for each](https://hackergpt.org/blog/api-security-testing-checklist/cybergym-results.webp)

*What we observed on 16 November 2026: two checks passed, eight rows are findings.*

## How do I turn the checklist into a repeatable test?

Keep the endpoint list and the matrix script in your repository and run them against a staging copy on every deploy. The script above is enough to start: one file of paths, two test tokens, and a table you can diff. When a new endpoint appears, it should appear in the list in the same pull request.

Then turn each row into an assertion. For every endpoint that holds user data, the test asserts that user A gets `200` on A's object and `403` or `404` on B's. For every admin route, it asserts that a customer token gets `401` or `403`. The expected answers are your authorization model written down; a test failure means the code and the model disagree.

## What does this checklist not cover?

It does not prove an API is safe. It shows how each endpoint answers a set of callers on the day you ran it. It does not test injection in every parameter (SQL, NoSQL, command injection), business logic that needs several steps in a row, race conditions, or the infrastructure behind the API. It finds nothing on an endpoint missing from your inventory. Treat it as the floor of an API test, and keep the [OWASP REST Security Cheat Sheet](https://cheatsheetseries.owasp.org/cheatsheets/REST_Security_Cheat_Sheet.html) open for what to fix.

## Key takeaways

- Build the endpoint inventory first, with the auth each endpoint should require; an unlisted endpoint is untested.
- Call every endpoint as four callers: no session, a forged token, the object's owner and another user.
- Read response bodies and token payloads, not just status codes; `200` can be safe and data can leak inside a `200`.
- Use object IDs that do not exist when you test destructive methods.
- Put the endpoint list and the expected answers in CI, so a missing authorization check fails a build instead of reaching production.

## FAQ

### What is an API security testing checklist?

It is a fixed set of checks you run against each endpoint of an API: authentication, object and function authorization, exposed fields, limits, errors, configuration and inventory. The OWASP API Security Top 10 (2023) is a practical way to organise it, because each category becomes a question you can ask of one endpoint.

### How do I test API authentication?

Call every non-public endpoint with no token, with a forged token, with an expired one and with one from a session you logged out of. Each must be refused with `401`. Then decode your own token and check that it expires and carries no secrets.

### How do I test for broken object level authorization?

Create two test accounts that each own an object. As user A, request user B's object by changing the ID in the URL or body. A safe API answers `403` or `404`; if it returns B's data, the endpoint checks that you are logged in but not that the object is yours.

### Can I run these checks on a live API?

Only on an API you own or have written permission to test. Prefer a staging copy, use your own test accounts, and avoid destructive methods on real objects. CyberGym is a legal target for practising the method.

### Which OWASP list applies to APIs?

The OWASP API Security Top 10, whose current edition is from 2023. It differs from the general OWASP Top 10 for web applications by splitting authorization into object, property and function levels, and by adding business flows, inventory and the consumption of third-party APIs.

## Sources

- [OWASP API Security Top 10 2023](https://api-security.owasp.org/editions/2023/en/0x11-t10/) and its ten category pages, linked in the table above
- [OWASP REST Security Cheat Sheet](https://cheatsheetseries.owasp.org/cheatsheets/REST_Security_Cheat_Sheet.html)
- [CyberGym](https://cybergym.hackergpt.app), running OWASP Juice Shop 19.1.1, tested on 16 November 2026

Map your own API's endpoints with [HackerGPT](https://hackergpt.app), or practise the checklist on [CyberGym](https://cybergym.hackergpt.app).
