How does this quiz work?
Each question shows a short, realistic code snippet with one security flaw. Pick the vulnerability class you think is present from four options. You will see immediately whether you were right, along with an explanation, a fix, and the CWE (Common Weakness Enumeration) ID for that vulnerability class.
Why use CWE IDs instead of OWASP Top 10 numbers?
OWASP Top 10 categories group many related weaknesses together and the numbering changes between editions. CWE IDs identify one specific weakness pattern, such as CWE-89 for SQL injection or CWE-22 for path traversal, so they stay stable and let you look up the exact issue on cwe.mitre.org.