A web application builds its login query by concatenating user input into a SQL statement. A tester enters ' OR '1'='1 and logs in without a valid password. Which vulnerability type does this show?
Show the answer
Correct answerC. SQL injection
AWhy not this: A race condition exploits timing between operations; the bypass here came from crafted input, not timing.
BWhy not this: Cross-site scripting injects client-side script into pages viewed by users; it does not alter a backend query.
CWhy this is right: Input altered the query's logic, bypassing authentication; this is the defining behavior of SQL injection.
DWhy not this: A buffer overflow writes past allocated memory; no memory corruption is described here.
SQL injection occurs when unsanitized input is concatenated into a database query, letting an attacker change its logic. Cross-site scripting also stems from unsanitized input, but it injects script that runs in a victim's browser, not query logic on the database.