The real OWASP Top 10
Understand the idea
Each item is a shape of bug you can point at in a handler, not a heading to memorize.
The idea
Broken access control is the notes route that returns Bea's title to Ada, the case. Cryptographic failure is a password column you can decrypt. Injection is the filter in this run: the caller sent an object with $ne, and the match treated it as an operator, so both notes came back. A string owner returns one. Insecure design is a note that was never given an owner, so there is nothing to compare. Security misconfiguration is a debug route that still prints the environment in production. Vulnerable components are the old package your process actually loads, which the supply-chain lesson takes apart. Identification failures are a login that confirms whether the email exists and accepts unlimited guesses. Integrity failures are running an update artifact you did not check. Logging failures are 401 responses that leave no record, so the stuffing run is invisible. SSRF is the server fetching a URL the client chose. The metadata address is on a network the browser cannot use and the server can. safeFetch refuses it. The rest of the list is the same kind of concrete check, in the lessons around this one.
What changes
| Risk | A handler that has it | The check |
|---|---|---|
| Broken access control | GET /notes/2 as Ada returns Bea's title | Compare owner, return 403 |
| Cryptographic failure | decrypt(passwordColumn) returns the password | Store a salt and a one-way hash |
| Injection | owner is an object with $ne and both notes match | Accept only a string id |
| Misconfiguration | GET /debug returns the environment | Do not mount that route in production |
| SSRF | The server fetches the URL the client sent | Refuse metadata and loopback hosts |
The command
Operator match versus a string, and a metadata URL
3s timeout · one stateless run. Node and Express use Piston when that instance accepts the job (public EMKC execute is whitelist-only; set PISTON_URL or PISTON_TOKEN). Otherwise a local Node process. MongoDB uses a fresh in-memory server per run, then it is stopped.
The mistake
Check the result
operator is 2. string is 1. The metadata URL prints blocked metadata. The ordinary API URL prints fetched and the host.
Guided challenge
Block the metadata host
safeFetch currently fetches every URL, including the metadata address. Refuse any URL that contains 169.254.169.254 and return blocked metadata.
Block the metadata host
3s timeout · one stateless run. Node and Express use Piston when that instance accepts the job (public EMKC execute is whitelist-only; set PISTON_URL or PISTON_TOKEN). Otherwise a local Node process. MongoDB uses a fresh in-memory server per run, then it is stopped.
EXPECTED RESULT
blocked metadata fetched https://api.example/notes
Hints 0/2
Use all hints or make 3 failed checks (0/3).
Free exploration
Change this example and run it again. Each run is a new process. Nothing is saved.
Your variation
3s timeout · one stateless run. Node and Express use Piston when that instance accepts the job (public EMKC execute is whitelist-only; set PISTON_URL or PISTON_TOKEN). Otherwise a local Node process. MongoDB uses a fresh in-memory server per run, then it is stopped.
Quiz
A quick check for understanding. Retry as often as you like; your learning path stays open.
Ready to call this one understood?
Mark this lesson complete to earn 200 XP. You can always revisit it.