Loading lesson…
Level 1 · Apprentice0 XP
When data is treated as code, an attacker writes your query for you.
Step 1 / 5
ProblemA login form builds its query by gluing the typed name into the SQL text. Someone types a name containing a quote and a few SQL words, and is logged in as the administrator without knowing any password.
← → step
Before this: The OWASP Top 10 tour
🛠️ Your turn
Reading is not the skill, doing is. Try for ten minutes before you open the hint. Getting stuck first is what makes the solution stick.
1.Find one place in a project where a query is built with string concatenation or interpolation and rewrite it with parameters. If you find none, write the vulnerable version of findByEmail on purpose, then fix it.