A web application has been identified as being susceptible to SQL injection attacks. Which control would be the MOST effective to mitigate this vulnerability?
Parameterized queries are the most effective control for preventing SQL injection attacks because they ensure that SQL code and data are sent to the database separately. This approach prevents attackers from manipulating the SQL code. While input validation is also essential, it is more general and may not be sufficient on its own to stop SQL injection specifically. Web application firewalls (WAFs) add another layer of protection but should not replace secure coding practices. Encryption, though important for protecting data at rest and in transit, does not directly address SQL injection vulnerabilities.
Ask Bash
Bash is our AI bot, trained to help you pass your exam. AI Generated Content may display inaccurate information, always double-check anything important.
What are parameterized queries and how do they work?
Open an interactive chat with Bash
What are some other common defenses against SQL injection?
Open an interactive chat with Bash
Why is input validation not sufficient on its own to prevent SQL injection?