API testing · Admin API
Admin users API returns every user without any login
P1 · CriticalIntermediateAdmin API
Want to find it yourself first? This page gives away the answer. Play this bug on a fake app screen and see if you can spot it in three tries.
The clue
What is missing from the request?
Steps to reproduce
- Send GET /api/admin/users with no Authorization header
Expected result
401 Unauthorized
Actual result
200 OK with all 4,814 users and their emails
Why it matters
This is a critical (P1) bug. It can lose money, expose private data or stop people from finishing a key task. A bug like this should block a release and be fixed straight away.
Testing tip
Call every protected endpoint with no token, an expired token and a normal user’s token. Only the right one should work.
How to find bugs like this
API bugs live in the JSON between the app and the server: wrong records returned, fields that leak private data, bad status codes and limits that are not enforced. When you test, try these checks:
- Read the whole response body, not only the status code.
- Ask for other users’ records on purpose.
- Look for fields that should never leave the server.
- Send values at and past every limit.