Automated scanners are good at finding things that look wrong: a missing security header, an outdated library, an obvious injection point. They’re much worse at finding things that look perfectly normal but shouldn’t be allowed. Those are business logic flaws, and they’re where a lot of the serious findings live.
An example
Imagine an API that returns invoices. You log in as user B and request an invoice by its ID:
GET /api/invoices/10482 HTTP/1.1
Authorization: Bearer <user B token>
HTTP/1.1 200 OK
{"id": 10482, "customer": "user-a", "total": 1840.00}
Illustrative. This is a made-up example to show the pattern. It isn’t from a real engagement.
Invoice 10482 belongs to user A. The request was well-formed, the session was valid and the response was a normal 200. Nothing is malformed, nothing looks like an attack. The bug is that the answer should have been a 403.
Why a scanner doesn’t catch it
To know the response is wrong, you have to know who owns invoice 10482 and who is allowed to see it. That’s knowledge about the business, not about HTTP. A tool has no way to know it, so it reports nothing and you get a clean-looking scan.
Other flaws in the same family
- Skipping a step in a multi-step process, such as going straight to the payment confirmation page
- Changing a price or quantity in a request the client controls
- Reusing a one-time code or discount
- Race conditions that let two requests spend the same balance
- Doing something your role shouldn’t be able to do, by calling the endpoint directly
The fix
Check ownership on the server for every object lookup, using the logged-in user from the session and never the ID in the URL alone. Add an automated test that tries exactly this, so it can’t quietly come back. Unguessable IDs are a decent extra layer, but they aren’t the fix.
This is why I test APIs by hand. If you’d like a second pair of eyes on yours, get in touch.