← All hands-on practice
Web security · 12 min
Talk to the API: JSON and two classic flaws
Apps talk to servers through APIs: a request goes out, JSON comes back. Use Wrenfield & Co's shop API as a customer, then find two things it forgot to check, and fix them.
Start it: free, in your browser, no account
What you will do
- Ask the API for your own profile.
- Open one of your own orders.
- Send a PATCH with a mistake in its JSON, and read the error.
- Your orders are 5001 and 5003. Try the one in between.
- Make yourself an admin, then list every user.
- Turn both fixes on, then send both attacks again and watch them fail.
Exam objectives it practises
- CompTIA Security+ 2.3 Types of vulnerabilities
- CompTIA PenTest+ 4.5 Web application attacks
Simplified: a handful of endpoints answered inside the page, with no real network. The token is a JWT with a made-up signature, and the server takes your role from its own database, not from the token. Real APIs also rate-limit, log and send more headers, and error wording varies. These two flaws are API1 and API3 in the OWASP API Security Top 10 (2023). Only test APIs you are authorised to.